hide reply button when it is not possible to reply
This commit is contained in:
parent
ab618ad898
commit
8967fd733e
@ -64,6 +64,15 @@ define(function() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
window.Element.prototype.detach = function() {
|
||||||
|
/*
|
||||||
|
Detach an element from the DOM and return it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
this.parentNode.removeChild(this);
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
window.Element.prototype.remove = function() {
|
window.Element.prototype.remove = function() {
|
||||||
// Mimimi, I am IE and I am so retarded, mimimi.
|
// Mimimi, I am IE and I am so retarded, mimimi.
|
||||||
this.parentNode.removeChild(this);
|
this.parentNode.removeChild(this);
|
||||||
|
@ -245,6 +245,19 @@ define(["behave", "app/text/html", "app/dom", "app/utils", "app/api", "app/marku
|
|||||||
|
|
||||||
clear("a.edit");
|
clear("a.edit");
|
||||||
clear("a.delete");
|
clear("a.delete");
|
||||||
|
|
||||||
|
// show direct reply to own comment when cookie is max aged
|
||||||
|
var show = function(el) {
|
||||||
|
if (utils.cookie(comment.id)) {
|
||||||
|
setTimeout(function() { show(el); }, 15*1000);
|
||||||
|
} else {
|
||||||
|
footer.append(el);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (utils.cookie(comment.id)) {
|
||||||
|
show($("a.reply", footer).detach());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user