Ressurect quotes before QuoteInline/QuotePreview. Quote links of deleted posts will thus work as usual if the post has been fetched before its deletion.
This commit is contained in:
parent
0fc9c5dea1
commit
bd250ba990
@ -3439,7 +3439,8 @@
|
|||||||
if (text = data.slice(0, index)) nodes.push($.tn(text));
|
if (text = data.slice(0, index)) nodes.push($.tn(text));
|
||||||
nodes.push($.el('a', {
|
nodes.push($.el('a', {
|
||||||
textContent: "" + quote[0] + "\u00A0(Dead)",
|
textContent: "" + quote[0] + "\u00A0(Dead)",
|
||||||
href: "#" + quote[1]
|
href: "#" + quote[1],
|
||||||
|
className: $.id(quote[1]) ? 'quotelink' : null
|
||||||
}));
|
}));
|
||||||
if (text = data.slice(index + quote[0].length)) nodes.push($.tn(text));
|
if (text = data.slice(index + quote[0].length)) nodes.push($.tn(text));
|
||||||
$.replace(node, nodes);
|
$.replace(node, nodes);
|
||||||
@ -3949,12 +3950,12 @@
|
|||||||
if (conf['Image Auto-Gif']) AutoGif.init();
|
if (conf['Image Auto-Gif']) AutoGif.init();
|
||||||
if (conf['Image Hover']) ImageHover.init();
|
if (conf['Image Hover']) ImageHover.init();
|
||||||
if (conf['Report Button']) ReportButton.init();
|
if (conf['Report Button']) ReportButton.init();
|
||||||
|
if (conf['Resurrect Quotes']) DeadQuotes.init();
|
||||||
if (conf['Quote Inline']) QuoteInline.init();
|
if (conf['Quote Inline']) QuoteInline.init();
|
||||||
if (conf['Quote Preview']) QuotePreview.init();
|
if (conf['Quote Preview']) QuotePreview.init();
|
||||||
if (conf['Quote Backlinks']) QuoteBacklink.init();
|
if (conf['Quote Backlinks']) QuoteBacklink.init();
|
||||||
if (conf['Indicate OP quote']) QuoteOP.init();
|
if (conf['Indicate OP quote']) QuoteOP.init();
|
||||||
if (conf['Indicate Cross-thread Quotes']) QuoteCT.init();
|
if (conf['Indicate Cross-thread Quotes']) QuoteCT.init();
|
||||||
if (conf['Resurrect Quotes']) DeadQuotes.init();
|
|
||||||
return $.ready(Main.ready);
|
return $.ready(Main.ready);
|
||||||
},
|
},
|
||||||
ready: function() {
|
ready: function() {
|
||||||
|
|||||||
@ -2835,6 +2835,7 @@ DeadQuotes =
|
|||||||
# \u00A0 is nbsp
|
# \u00A0 is nbsp
|
||||||
textContent: "#{quote[0]}\u00A0(Dead)"
|
textContent: "#{quote[0]}\u00A0(Dead)"
|
||||||
href: "##{quote[1]}" # Here be archive link
|
href: "##{quote[1]}" # Here be archive link
|
||||||
|
className: if $.id quote[1] then 'quotelink' else null
|
||||||
if text = data[index + quote[0].length...]
|
if text = data[index + quote[0].length...]
|
||||||
nodes.push $.tn text
|
nodes.push $.tn text
|
||||||
$.replace node, nodes
|
$.replace node, nodes
|
||||||
@ -3259,6 +3260,9 @@ Main =
|
|||||||
if conf['Report Button']
|
if conf['Report Button']
|
||||||
ReportButton.init()
|
ReportButton.init()
|
||||||
|
|
||||||
|
if conf['Resurrect Quotes']
|
||||||
|
DeadQuotes.init()
|
||||||
|
|
||||||
if conf['Quote Inline']
|
if conf['Quote Inline']
|
||||||
QuoteInline.init()
|
QuoteInline.init()
|
||||||
|
|
||||||
@ -3274,9 +3278,6 @@ Main =
|
|||||||
if conf['Indicate Cross-thread Quotes']
|
if conf['Indicate Cross-thread Quotes']
|
||||||
QuoteCT.init()
|
QuoteCT.init()
|
||||||
|
|
||||||
if conf['Resurrect Quotes']
|
|
||||||
DeadQuotes.init()
|
|
||||||
|
|
||||||
$.ready Main.ready
|
$.ready Main.ready
|
||||||
|
|
||||||
ready: ->
|
ready: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user