A bit deeper.
This commit is contained in:
parent
fa2ebec87a
commit
ca2051313d
11
4chan_x.js
11
4chan_x.js
@ -1461,7 +1461,7 @@
|
|||||||
};
|
};
|
||||||
watcher = {
|
watcher = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var board, dialog, favicon, html, id, input, inputs, props, src, watched, watchedBoard, _i, _len, _ref, _results;
|
var dialog, favicon, html, id, input, inputs, src, watched, watchedBoard, _i, _len, _results;
|
||||||
html = '<div class=move>Thread Watcher</div>';
|
html = '<div class=move>Thread Watcher</div>';
|
||||||
dialog = ui.dialog('watcher', {
|
dialog = ui.dialog('watcher', {
|
||||||
top: '50px',
|
top: '50px',
|
||||||
@ -1469,13 +1469,7 @@
|
|||||||
}, html);
|
}, html);
|
||||||
$.append(d.body, dialog);
|
$.append(d.body, dialog);
|
||||||
watched = $.getValue('watched', {});
|
watched = $.getValue('watched', {});
|
||||||
for (board in watched) {
|
watcher.list(watched);
|
||||||
_ref = watched[board];
|
|
||||||
for (id in _ref) {
|
|
||||||
props = _ref[id];
|
|
||||||
watcher.addLink(props, dialog);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
watchedBoard = watched[g.BOARD] || {};
|
watchedBoard = watched[g.BOARD] || {};
|
||||||
inputs = $$('form > input[value=delete], div.thread > input[value=delete]');
|
inputs = $$('form > input[value=delete], div.thread > input[value=delete]');
|
||||||
_results = [];
|
_results = [];
|
||||||
@ -1520,7 +1514,6 @@
|
|||||||
},
|
},
|
||||||
addLink: function(props, dialog) {
|
addLink: function(props, dialog) {
|
||||||
var div, link, x;
|
var div, link, x;
|
||||||
dialog || (dialog = $('#watcher'));
|
|
||||||
div = $.el('div');
|
div = $.el('div');
|
||||||
x = $.el('a', {
|
x = $.el('a', {
|
||||||
textContent: 'X'
|
textContent: 'X'
|
||||||
|
|||||||
@ -1165,9 +1165,7 @@ watcher =
|
|||||||
|
|
||||||
#populate watcher
|
#populate watcher
|
||||||
watched = $.getValue 'watched', {}
|
watched = $.getValue 'watched', {}
|
||||||
for board of watched
|
watcher.list watched
|
||||||
for id, props of watched[board]
|
|
||||||
watcher.addLink props, dialog
|
|
||||||
|
|
||||||
#add watch buttons
|
#add watch buttons
|
||||||
watchedBoard = watched[g.BOARD] or {}
|
watchedBoard = watched[g.BOARD] or {}
|
||||||
@ -1194,7 +1192,6 @@ watcher =
|
|||||||
watcher.addLink props, $ '#watcher'
|
watcher.addLink props, $ '#watcher'
|
||||||
|
|
||||||
addLink: (props, dialog) ->
|
addLink: (props, dialog) ->
|
||||||
dialog or= $ '#watcher'
|
|
||||||
div = $.el 'div'
|
div = $.el 'div'
|
||||||
x = $.el 'a',
|
x = $.el 'a',
|
||||||
textContent: 'X'
|
textContent: 'X'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user