indicate duckrolls. Close #17
This commit is contained in:
parent
5bc33ec8f8
commit
0a03e393e7
@ -66,7 +66,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, Recaptcha, SECOND, Time, VERSION, anonymize, conf, config, cooldown, d, engine, expandComment, expandThread, filter, flatten, g, getTitle, imgExpand, imgGif, imgHover, key, keybinds, log, nav, options, qr, quoteBacklink, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, strikethroughQuotes, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher;
|
var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, Recaptcha, SECOND, Time, VERSION, anonymize, conf, config, cooldown, d, engine, expandComment, expandThread, filter, flatten, g, getTitle, imgExpand, imgGif, imgHover, key, keybinds, log, nav, options, qr, quoteBacklink, quoteDR, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, strikethroughQuotes, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher;
|
||||||
var __slice = Array.prototype.slice;
|
var __slice = Array.prototype.slice;
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -120,7 +120,8 @@
|
|||||||
'Quote Highlighting': [true, 'Highlight the previewed post'],
|
'Quote Highlighting': [true, 'Highlight the previewed post'],
|
||||||
'Quote Inline': [true, 'Show quoted post inline on quote click'],
|
'Quote Inline': [true, 'Show quoted post inline on quote click'],
|
||||||
'Quote Preview': [true, 'Show quote content on hover'],
|
'Quote Preview': [true, 'Show quote content on hover'],
|
||||||
'Indicate OP quote': [true, 'Add \'(OP)\' to OP quotes']
|
'Indicate OP quote': [true, 'Add \'(OP)\' to OP quotes'],
|
||||||
|
'Indicate Duckrolls': [false, 'Add \'(Duckroll)\' to cross threads quotes']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filter: {
|
filter: {
|
||||||
@ -2581,6 +2582,27 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
quoteDR = {
|
||||||
|
init: function() {
|
||||||
|
return g.callbacks.push(function(root) {
|
||||||
|
var quote, tid, _i, _len, _ref, _results;
|
||||||
|
if (root.className === 'inline') return;
|
||||||
|
tid = g.THREAD_ID || $.x('ancestor::div[contains(@class,"thread")]/div', root).id;
|
||||||
|
_ref = $$('.quotelink', root);
|
||||||
|
_results = [];
|
||||||
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
|
quote = _ref[_i];
|
||||||
|
if (quote.pathname.indexOf("res/" + tid) === -1) {
|
||||||
|
_results.push(quote.innerHTML += ' (Duckroll)');
|
||||||
|
} else {
|
||||||
|
_results.push(void 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _results;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
reportButton = {
|
reportButton = {
|
||||||
init: function() {
|
init: function() {
|
||||||
return g.callbacks.push(function(root) {
|
return g.callbacks.push(function(root) {
|
||||||
@ -2962,6 +2984,7 @@
|
|||||||
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 Duckrolls']) quoteDR.init();
|
||||||
if (d.body) {
|
if (d.body) {
|
||||||
return Main.onLoad();
|
return Main.onLoad();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
master
|
master
|
||||||
|
- mayhem
|
||||||
|
new Indicate Duckrolls feature
|
||||||
|
|
||||||
2.21.4
|
2.21.4
|
||||||
- mayhem
|
- mayhem
|
||||||
|
|||||||
@ -45,6 +45,7 @@ config =
|
|||||||
'Quote Inline': [true, 'Show quoted post inline on quote click']
|
'Quote Inline': [true, 'Show quoted post inline on quote click']
|
||||||
'Quote Preview': [true, 'Show quote content on hover']
|
'Quote Preview': [true, 'Show quote content on hover']
|
||||||
'Indicate OP quote': [true, 'Add \'(OP)\' to OP quotes']
|
'Indicate OP quote': [true, 'Add \'(OP)\' to OP quotes']
|
||||||
|
'Indicate Duckrolls': [false, 'Add \'(Duckroll)\' to cross threads quotes']
|
||||||
filter:
|
filter:
|
||||||
name: ''
|
name: ''
|
||||||
tripcode: ''
|
tripcode: ''
|
||||||
@ -1995,6 +1996,15 @@ quoteOP =
|
|||||||
if quote.hash[1..] is tid
|
if quote.hash[1..] is tid
|
||||||
quote.innerHTML += ' (OP)'
|
quote.innerHTML += ' (OP)'
|
||||||
|
|
||||||
|
quoteDR =
|
||||||
|
init: ->
|
||||||
|
g.callbacks.push (root) ->
|
||||||
|
return if root.className is 'inline'
|
||||||
|
tid = g.THREAD_ID or $.x('ancestor::div[contains(@class,"thread")]/div', root).id
|
||||||
|
for quote in $$ '.quotelink', root
|
||||||
|
if quote.pathname.indexOf("res/#{tid}") is -1
|
||||||
|
quote.innerHTML += ' (Duckroll)'
|
||||||
|
|
||||||
reportButton =
|
reportButton =
|
||||||
init: ->
|
init: ->
|
||||||
g.callbacks.push (root) ->
|
g.callbacks.push (root) ->
|
||||||
@ -2317,6 +2327,9 @@ Main =
|
|||||||
if conf['Indicate OP quote']
|
if conf['Indicate OP quote']
|
||||||
quoteOP.init()
|
quoteOP.init()
|
||||||
|
|
||||||
|
if conf['Indicate Duckrolls']
|
||||||
|
quoteDR.init()
|
||||||
|
|
||||||
|
|
||||||
if d.body
|
if d.body
|
||||||
Main.onLoad()
|
Main.onLoad()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user