anonymize checkWatched
This commit is contained in:
parent
ddf9440a8f
commit
162988ace5
@ -777,12 +777,6 @@ redirect = ->
|
|||||||
url = "http://boards.4chan.org/#{BOARD}"
|
url = "http://boards.4chan.org/#{BOARD}"
|
||||||
location.href = url
|
location.href = url
|
||||||
|
|
||||||
checkWatched = (id) ->
|
|
||||||
for thread in threads
|
|
||||||
if id is thread.id
|
|
||||||
return favNormal
|
|
||||||
favEmpty
|
|
||||||
|
|
||||||
#main part 2...
|
#main part 2...
|
||||||
if navtopr = $ '#navtopr a'
|
if navtopr = $ '#navtopr a'
|
||||||
text = navtopr.nextSibling #css doesn't see text nodes
|
text = navtopr.nextSibling #css doesn't see text nodes
|
||||||
@ -885,9 +879,14 @@ if getConfig 'Thread Watcher'
|
|||||||
inputs = $$('form > input[value="delete"], div > input[value="delete"]')
|
inputs = $$('form > input[value="delete"], div > input[value="delete"]')
|
||||||
for input in inputs
|
for input in inputs
|
||||||
id = input.name
|
id = input.name
|
||||||
src = checkWatched id
|
src = (->
|
||||||
|
for thread in threads
|
||||||
|
if id is thread.id
|
||||||
|
return favNormal
|
||||||
|
favEmpty
|
||||||
|
)()
|
||||||
img = n 'img',
|
img = n 'img',
|
||||||
src: checkWatched id
|
src: src
|
||||||
className: 'pointer'
|
className: 'pointer'
|
||||||
listener: ['click', watch]
|
listener: ['click', watch]
|
||||||
inBefore input, img
|
inBefore input, img
|
||||||
|
|||||||
44
4chan_x.js
44
4chan_x.js
@ -1,5 +1,5 @@
|
|||||||
(function() {
|
(function() {
|
||||||
var $, $$, AEOS, BOARD, DAY, PAGENUM, REPLY, THREAD_ID, _, _i, _len, _ref, a, addTo, arr, as, autoWatch, autohide, b, board, callback, callbacks, checkWatched, clearHidden, close, config, cooldown, cutoff, d, defaultSaucePrefix, delform, down, editSauce, el, expandComment, expandThread, favEmpty, favNormal, favicon, getConfig, getTime, head, hiddenReplies, hiddenThreads, hide, hideReply, hideThread, href, html, i, i1, id, iframe, iframeLoad, iframeLoop, img, inAfter, inBefore, input, inputs, l, l1, lastChecked, magic, n, navbotr, navtopr, nodeInserted, now, omitted, onloadComment, onloadThread, options, optionsClose, parseResponse, pathname, quickReply, r, recaptcha, recaptchaListener, recaptchaReload, redirect, remove, replace, replyNav, report, show, showReply, showThread, slice, span, src, stopPropagation, submit, text, textContent, thread, threadF, threads, tn, up, watch, watchX, watched, watcher, watcherUpdate, x, xhrs;
|
var $, $$, AEOS, BOARD, DAY, PAGENUM, REPLY, THREAD_ID, _, _i, _len, _ref, a, addTo, arr, as, autoWatch, autohide, b, board, callback, callbacks, clearHidden, close, config, cooldown, cutoff, d, defaultSaucePrefix, delform, down, editSauce, el, expandComment, expandThread, favEmpty, favNormal, favicon, getConfig, getTime, head, hiddenReplies, hiddenThreads, hide, hideReply, hideThread, href, html, i, i1, id, iframe, iframeLoad, iframeLoop, inAfter, inBefore, inputs, l, l1, lastChecked, magic, n, navbotr, navtopr, nodeInserted, now, omitted, onloadComment, onloadThread, options, optionsClose, parseResponse, pathname, quickReply, r, recaptcha, recaptchaListener, recaptchaReload, redirect, remove, replace, replyNav, report, show, showReply, showThread, slice, span, stopPropagation, submit, text, textContent, thread, threadF, threads, tn, up, watch, watchX, watched, watcher, watcherUpdate, x, xhrs;
|
||||||
var __slice = Array.prototype.slice, __hasProp = Object.prototype.hasOwnProperty;
|
var __slice = Array.prototype.slice, __hasProp = Object.prototype.hasOwnProperty;
|
||||||
config = {
|
config = {
|
||||||
'Thread Hiding': [true, 'Hide entire threads'],
|
'Thread Hiding': [true, 'Hide entire threads'],
|
||||||
@ -890,17 +890,6 @@
|
|||||||
}
|
}
|
||||||
return (location.href = url);
|
return (location.href = url);
|
||||||
};
|
};
|
||||||
checkWatched = function(id) {
|
|
||||||
var _i, _len, _ref2, thread;
|
|
||||||
_ref2 = threads;
|
|
||||||
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
|
||||||
thread = _ref2[_i];
|
|
||||||
if (id === thread.id) {
|
|
||||||
return favNormal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return favEmpty;
|
|
||||||
};
|
|
||||||
if (navtopr = $('#navtopr a')) {
|
if (navtopr = $('#navtopr a')) {
|
||||||
text = navtopr.nextSibling;
|
text = navtopr.nextSibling;
|
||||||
a = n('a', {
|
a = n('a', {
|
||||||
@ -1044,15 +1033,28 @@
|
|||||||
inputs = $$('form > input[value="delete"], div > input[value="delete"]');
|
inputs = $$('form > input[value="delete"], div > input[value="delete"]');
|
||||||
_ref = inputs;
|
_ref = inputs;
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
input = _ref[_i];
|
(function() {
|
||||||
id = input.name;
|
var img, src;
|
||||||
src = checkWatched(id);
|
var input = _ref[_i];
|
||||||
img = n('img', {
|
id = input.name;
|
||||||
src: checkWatched(id),
|
src = (function() {
|
||||||
className: 'pointer',
|
var _j, _len2, _ref2, thread;
|
||||||
listener: ['click', watch]
|
_ref2 = threads;
|
||||||
});
|
for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) {
|
||||||
inBefore(input, img);
|
thread = _ref2[_j];
|
||||||
|
if (id === thread.id) {
|
||||||
|
return favNormal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return favEmpty;
|
||||||
|
})();
|
||||||
|
img = n('img', {
|
||||||
|
src: src,
|
||||||
|
className: 'pointer',
|
||||||
|
listener: ['click', watch]
|
||||||
|
});
|
||||||
|
return inBefore(input, img);
|
||||||
|
})();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getConfig('Anonymize')) {
|
if (getConfig('Anonymize')) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user