Personal touches
This commit is contained in:
parent
19e1af9b46
commit
b77864b1da
@ -7768,8 +7768,11 @@
|
|||||||
var ID, board, div, favicon, id, link, nodes, props, thread, x, _ref, _ref1;
|
var ID, board, div, favicon, id, link, nodes, props, thread, x, _ref, _ref1;
|
||||||
|
|
||||||
if (!watched) {
|
if (!watched) {
|
||||||
$.get('WatchedThreads', {}, function(item) {
|
$.get('WatchedThreads', {}, function(_arg) {
|
||||||
return ThreadWatcher.refresh(item['WatchedThreads']);
|
var WatchedThreads;
|
||||||
|
|
||||||
|
WatchedThreads = _arg.WatchedThreads;
|
||||||
|
return ThreadWatcher.refresh(WatchedThreads);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -7798,11 +7801,7 @@
|
|||||||
for (ID in _ref1) {
|
for (ID in _ref1) {
|
||||||
thread = _ref1[ID];
|
thread = _ref1[ID];
|
||||||
favicon = $('.watch-thread-link', thread.OP.nodes.post);
|
favicon = $('.watch-thread-link', thread.OP.nodes.post);
|
||||||
if (ID in watched) {
|
$[ID in watched ? 'addClass' : 'rmClass'](favicon, 'watched');
|
||||||
$.addClass(favicon, 'watched');
|
|
||||||
} else {
|
|
||||||
$.rmClass(favicon, 'watched');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toggleWatcher: function() {
|
toggleWatcher: function() {
|
||||||
|
|||||||
@ -7749,8 +7749,11 @@
|
|||||||
var ID, board, div, favicon, id, link, nodes, props, thread, x, _ref, _ref1;
|
var ID, board, div, favicon, id, link, nodes, props, thread, x, _ref, _ref1;
|
||||||
|
|
||||||
if (!watched) {
|
if (!watched) {
|
||||||
$.get('WatchedThreads', {}, function(item) {
|
$.get('WatchedThreads', {}, function(_arg) {
|
||||||
return ThreadWatcher.refresh(item['WatchedThreads']);
|
var WatchedThreads;
|
||||||
|
|
||||||
|
WatchedThreads = _arg.WatchedThreads;
|
||||||
|
return ThreadWatcher.refresh(WatchedThreads);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -7779,11 +7782,7 @@
|
|||||||
for (ID in _ref1) {
|
for (ID in _ref1) {
|
||||||
thread = _ref1[ID];
|
thread = _ref1[ID];
|
||||||
favicon = $('.watch-thread-link', thread.OP.nodes.post);
|
favicon = $('.watch-thread-link', thread.OP.nodes.post);
|
||||||
if (ID in watched) {
|
$[ID in watched ? 'addClass' : 'rmClass'](favicon, 'watched');
|
||||||
$.addClass(favicon, 'watched');
|
|
||||||
} else {
|
|
||||||
$.rmClass(favicon, 'watched');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toggleWatcher: function() {
|
toggleWatcher: function() {
|
||||||
|
|||||||
@ -43,8 +43,8 @@ ThreadWatcher =
|
|||||||
|
|
||||||
refresh: (watched) ->
|
refresh: (watched) ->
|
||||||
unless watched
|
unless watched
|
||||||
$.get 'WatchedThreads', {}, (item) ->
|
$.get 'WatchedThreads', {}, ({WatchedThreads}) ->
|
||||||
ThreadWatcher.refresh item['WatchedThreads']
|
ThreadWatcher.refresh WatchedThreads
|
||||||
return
|
return
|
||||||
nodes = [$('.move', ThreadWatcher.dialog)]
|
nodes = [$('.move', ThreadWatcher.dialog)]
|
||||||
for board of watched
|
for board of watched
|
||||||
@ -67,10 +67,7 @@ ThreadWatcher =
|
|||||||
watched = watched[g.BOARD] or {}
|
watched = watched[g.BOARD] or {}
|
||||||
for ID, thread of g.BOARD.threads
|
for ID, thread of g.BOARD.threads
|
||||||
favicon = $ '.watch-thread-link', thread.OP.nodes.post
|
favicon = $ '.watch-thread-link', thread.OP.nodes.post
|
||||||
if ID of watched
|
$[if ID of watched then 'addClass' else 'rmClass'] favicon, 'watched'
|
||||||
$.addClass favicon, 'watched'
|
|
||||||
else
|
|
||||||
$.rmClass favicon, 'watched'
|
|
||||||
return
|
return
|
||||||
|
|
||||||
toggleWatcher: ->
|
toggleWatcher: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user