un(Dead) quotelinks when resurrecting. #932
This commit is contained in:
parent
b416253b09
commit
163676c5a1
@ -20,7 +20,7 @@
|
|||||||
// @icon data:image/gif;base64,R0lGODlhEAAQAKECAAAAAGbMM////////yH5BAEKAAIALAAAAAAQABAAAAIxlI+pq+D9DAgUoFkPDlbs7lGiI2bSVnKglnJMOL6omczxVZK3dH/41AG6Lh7i6qUoAAA7
|
// @icon data:image/gif;base64,R0lGODlhEAAQAKECAAAAAGbMM////////yH5BAEKAAIALAAAAAAQABAAAAIxlI+pq+D9DAgUoFkPDlbs7lGiI2bSVnKglnJMOL6omczxVZK3dH/41AG6Lh7i6qUoAAA7
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/* 4chan X Beta - Version 3.0.0 - 2013-03-14
|
/* 4chan X Beta - Version 3.0.0 - 2013-03-15
|
||||||
* http://mayhemydg.github.com/4chan-x/
|
* http://mayhemydg.github.com/4chan-x/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
|
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
|
||||||
@ -7357,7 +7357,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
Post.prototype.resurrect = function() {
|
Post.prototype.resurrect = function() {
|
||||||
var clone, strong, _i, _len, _ref, _results;
|
var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1;
|
||||||
delete this.isDead;
|
delete this.isDead;
|
||||||
delete this.timeOfDeath;
|
delete this.timeOfDeath;
|
||||||
$.rmClass(this.nodes.root, 'deleted-post');
|
$.rmClass(this.nodes.root, 'deleted-post');
|
||||||
@ -7368,13 +7368,20 @@
|
|||||||
$.rm(strong);
|
$.rm(strong);
|
||||||
}
|
}
|
||||||
if (this.isClone) {
|
if (this.isClone) {
|
||||||
_ref = this.clones;
|
return;
|
||||||
_results = [];
|
}
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
_ref = this.clones;
|
||||||
clone = _ref[_i];
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
_results.push(clone.resurrect());
|
clone = _ref[_i];
|
||||||
|
clone.resurrect();
|
||||||
|
}
|
||||||
|
_ref1 = Get.allQuotelinksLinkingTo(this);
|
||||||
|
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||||
|
quotelink = _ref1[_j];
|
||||||
|
if ($.hasClass(quotelink, 'deadlink')) {
|
||||||
|
quotelink.textContent = quotelink.textContent.replace('\u00A0(Dead)', '');
|
||||||
|
$.rmClass(quotelink, 'deadlink');
|
||||||
}
|
}
|
||||||
return _results;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -197,9 +197,15 @@ class Post
|
|||||||
strong.textContent = '[File deleted]'
|
strong.textContent = '[File deleted]'
|
||||||
else
|
else
|
||||||
$.rm strong
|
$.rm strong
|
||||||
|
|
||||||
return if @isClone
|
return if @isClone
|
||||||
for clone in @clones
|
for clone in @clones
|
||||||
clone.resurrect()
|
clone.resurrect()
|
||||||
|
|
||||||
|
for quotelink in Get.allQuotelinksLinkingTo @
|
||||||
|
if $.hasClass quotelink, 'deadlink'
|
||||||
|
quotelink.textContent = quotelink.textContent.replace '\u00A0(Dead)', ''
|
||||||
|
$.rmClass quotelink, 'deadlink'
|
||||||
return
|
return
|
||||||
addClone: (context) ->
|
addClone: (context) ->
|
||||||
new Clone @, context
|
new Clone @, context
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user