Strikethrough quotelinks of filtered posts.
This commit is contained in:
parent
b5bb703288
commit
fa83f24a09
@ -61,7 +61,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, QR, SECOND, Time, anonymize, conf, config, d, expandComment, expandThread, filter, firstRun, flatten, g, getTitle, imgExpand, imgGif, imgHover, imgPreloading, key, keybinds, log, nav, options, quoteBacklink, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher;
|
var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, QR, SECOND, Time, anonymize, conf, config, d, expandComment, expandThread, filter, firstRun, flatten, g, getTitle, imgExpand, imgGif, imgHover, imgPreloading, key, keybinds, log, nav, options, quoteBacklink, 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 = {
|
||||||
main: {
|
main: {
|
||||||
@ -586,6 +586,23 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
strikethroughQuotes = {
|
||||||
|
init: function() {
|
||||||
|
return g.callbacks.push(function(root) {
|
||||||
|
var el, quote, _i, _len, _ref, _results;
|
||||||
|
if (root.className === 'inline') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_ref = $$('.quotelink', root);
|
||||||
|
_results = [];
|
||||||
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
|
quote = _ref[_i];
|
||||||
|
_results.push((el = $.id(quote.hash.slice(1))) ? el.parentNode.parentNode.parentNode.hidden ? $.addClass(quote, 'filtered') : void 0 : void 0);
|
||||||
|
}
|
||||||
|
return _results;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
expandComment = {
|
expandComment = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var a, _i, _len, _ref, _results;
|
var a, _i, _len, _ref, _results;
|
||||||
@ -3036,6 +3053,9 @@
|
|||||||
if (conf['Reply Hiding']) {
|
if (conf['Reply Hiding']) {
|
||||||
replyHiding.init();
|
replyHiding.init();
|
||||||
}
|
}
|
||||||
|
if (conf['Filter'] || conf['Reply Hiding']) {
|
||||||
|
strikethroughQuotes.init();
|
||||||
|
}
|
||||||
if (conf['Anonymize']) {
|
if (conf['Anonymize']) {
|
||||||
anonymize.init();
|
anonymize.init();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -425,6 +425,15 @@ filter =
|
|||||||
if img = $ 'img[md5]', root
|
if img = $ 'img[md5]', root
|
||||||
filter.test 'md5', img.getAttribute('md5')
|
filter.test 'md5', img.getAttribute('md5')
|
||||||
|
|
||||||
|
strikethroughQuotes =
|
||||||
|
init: ->
|
||||||
|
g.callbacks.push (root) ->
|
||||||
|
return if root.className is 'inline'
|
||||||
|
for quote in $$ '.quotelink', root
|
||||||
|
if el = $.id quote.hash[1..]
|
||||||
|
if el.parentNode.parentNode.parentNode.hidden
|
||||||
|
$.addClass quote, 'filtered'
|
||||||
|
|
||||||
expandComment =
|
expandComment =
|
||||||
init: ->
|
init: ->
|
||||||
for a in $$ '.abbr a'
|
for a in $$ '.abbr a'
|
||||||
@ -2308,6 +2317,9 @@ Main =
|
|||||||
if conf['Reply Hiding']
|
if conf['Reply Hiding']
|
||||||
replyHiding.init()
|
replyHiding.init()
|
||||||
|
|
||||||
|
if conf['Filter'] or conf['Reply Hiding']
|
||||||
|
strikethroughQuotes.init()
|
||||||
|
|
||||||
if conf['Anonymize']
|
if conf['Anonymize']
|
||||||
anonymize.init()
|
anonymize.init()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user