Rename function. A bit deeper.
This commit is contained in:
parent
ca2051313d
commit
62763b2e0c
12
4chan_x.js
12
4chan_x.js
@ -1469,7 +1469,7 @@
|
|||||||
}, html);
|
}, html);
|
||||||
$.append(d.body, dialog);
|
$.append(d.body, dialog);
|
||||||
watched = $.getValue('watched', {});
|
watched = $.getValue('watched', {});
|
||||||
watcher.list(watched);
|
watcher.refresh(watched);
|
||||||
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 = [];
|
||||||
@ -1490,12 +1490,10 @@
|
|||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
},
|
},
|
||||||
list: function(watched) {
|
refresh: function(watched) {
|
||||||
var board, div, id, props, _results;
|
var board, div, id, props, _results;
|
||||||
div = $('#watcher > div:not(.move)');
|
while (div = $('#watcher > div:not(.move)')) {
|
||||||
while (div) {
|
|
||||||
$.remove(div);
|
$.remove(div);
|
||||||
div = $('#watcher > div:not(.move)');
|
|
||||||
}
|
}
|
||||||
_results = [];
|
_results = [];
|
||||||
for (board in watched) {
|
for (board in watched) {
|
||||||
@ -1552,7 +1550,7 @@
|
|||||||
watched = $.getValue('watched', {});
|
watched = $.getValue('watched', {});
|
||||||
delete watched[board][id];
|
delete watched[board][id];
|
||||||
$.setValue('watched', watched);
|
$.setValue('watched', watched);
|
||||||
return watcher.list(watched);
|
return watcher.refresh(watched);
|
||||||
},
|
},
|
||||||
watch: function(thread) {
|
watch: function(thread) {
|
||||||
var favicon, id, props, tc, watched, _name;
|
var favicon, id, props, tc, watched, _name;
|
||||||
@ -1571,7 +1569,7 @@
|
|||||||
watched[_name = g.BOARD] || (watched[_name] = {});
|
watched[_name = g.BOARD] || (watched[_name] = {});
|
||||||
watched[g.BOARD][id] = props;
|
watched[g.BOARD][id] = props;
|
||||||
$.setValue('watched', watched);
|
$.setValue('watched', watched);
|
||||||
return watcher.list(watched);
|
return watcher.refresh(watched);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
anonymize = {
|
anonymize = {
|
||||||
|
|||||||
@ -1165,7 +1165,7 @@ watcher =
|
|||||||
|
|
||||||
#populate watcher
|
#populate watcher
|
||||||
watched = $.getValue 'watched', {}
|
watched = $.getValue 'watched', {}
|
||||||
watcher.list watched
|
watcher.refresh watched
|
||||||
|
|
||||||
#add watch buttons
|
#add watch buttons
|
||||||
watchedBoard = watched[g.BOARD] or {}
|
watchedBoard = watched[g.BOARD] or {}
|
||||||
@ -1182,11 +1182,9 @@ watcher =
|
|||||||
$.bind favicon, 'click', watcher.cb.toggle
|
$.bind favicon, 'click', watcher.cb.toggle
|
||||||
$.before input, favicon
|
$.before input, favicon
|
||||||
|
|
||||||
list: (watched) ->
|
refresh: (watched) ->
|
||||||
div = $ '#watcher > div:not(.move)'
|
while div = $ '#watcher > div:not(.move)'
|
||||||
while div
|
|
||||||
$.remove div
|
$.remove div
|
||||||
div = $ '#watcher > div:not(.move)'
|
|
||||||
for board of watched
|
for board of watched
|
||||||
for id, props of watched[board]
|
for id, props of watched[board]
|
||||||
watcher.addLink props, $ '#watcher'
|
watcher.addLink props, $ '#watcher'
|
||||||
@ -1226,7 +1224,7 @@ watcher =
|
|||||||
delete watched[board][id]
|
delete watched[board][id]
|
||||||
$.setValue 'watched', watched
|
$.setValue 'watched', watched
|
||||||
|
|
||||||
watcher.list watched
|
watcher.refresh watched
|
||||||
|
|
||||||
watch: (thread) ->
|
watch: (thread) ->
|
||||||
favicon = $ 'img.favicon', thread
|
favicon = $ 'img.favicon', thread
|
||||||
@ -1244,7 +1242,7 @@ watcher =
|
|||||||
watched[g.BOARD][id] = props
|
watched[g.BOARD][id] = props
|
||||||
$.setValue 'watched', watched
|
$.setValue 'watched', watched
|
||||||
|
|
||||||
watcher.list watched
|
watcher.refresh watched
|
||||||
|
|
||||||
anonymize =
|
anonymize =
|
||||||
init: ->
|
init: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user