mirror of
https://github.com/rystaf/mlmym.git
synced 2024-11-21 21:27:15 +00:00
fix read post
This commit is contained in:
parent
88aff9cbe9
commit
410e1513ac
|
@ -5,7 +5,7 @@ function request(url, params, callback, errorcallback = function(){}) {
|
||||||
if (xmlHttp.status == 200) {
|
if (xmlHttp.status == 200) {
|
||||||
return callback(xmlHttp.responseText);
|
return callback(xmlHttp.responseText);
|
||||||
}
|
}
|
||||||
if (errorcallback) errorcallback(xmlHttp.responseText);
|
errorcallback(xmlHttp.responseText);
|
||||||
}
|
}
|
||||||
var method = "GET"
|
var method = "GET"
|
||||||
if (params) method = "POST"
|
if (params) method = "POST"
|
||||||
|
@ -33,7 +33,12 @@ function postClick(e) {
|
||||||
var url = targ.getElementsByClassName("url")[0].href
|
var url = targ.getElementsByClassName("url")[0].href
|
||||||
if (bdy.querySelector("img.image") && localStorage.getItem("markRead") == "true") {
|
if (bdy.querySelector("img.image") && localStorage.getItem("markRead") == "true") {
|
||||||
bdy.parentNode.querySelector(".title").className = "title visited"
|
bdy.parentNode.querySelector(".title").className = "title visited"
|
||||||
request(bdy.parentNode.querySelector('.buttons a').href, { op: "read_post", submit: "mark read"})
|
var data = new FormData();
|
||||||
|
data.append("op", "read_post")
|
||||||
|
data.append("submit", "mark read")
|
||||||
|
data.append("xhr", "1")
|
||||||
|
data.append("postid", bdy.parentNode.parentNode.id.slice(1))
|
||||||
|
request("", data)
|
||||||
}
|
}
|
||||||
if (id = parseYoutube(url)) {
|
if (id = parseYoutube(url)) {
|
||||||
targ.getElementsByClassName("embed")[0].innerHTML = youtubeIframe(id)
|
targ.getElementsByClassName("embed")[0].innerHTML = youtubeIframe(id)
|
||||||
|
|
Loading…
Reference in a new issue