Personal touches

This commit is contained in:
Zixaphir 2013-08-12 17:21:01 -07:00
parent 19e1af9b46
commit b77864b1da
3 changed files with 15 additions and 20 deletions

View File

@ -7768,8 +7768,11 @@
var ID, board, div, favicon, id, link, nodes, props, thread, x, _ref, _ref1;
if (!watched) {
$.get('WatchedThreads', {}, function(item) {
return ThreadWatcher.refresh(item['WatchedThreads']);
$.get('WatchedThreads', {}, function(_arg) {
var WatchedThreads;
WatchedThreads = _arg.WatchedThreads;
return ThreadWatcher.refresh(WatchedThreads);
});
return;
}
@ -7798,11 +7801,7 @@
for (ID in _ref1) {
thread = _ref1[ID];
favicon = $('.watch-thread-link', thread.OP.nodes.post);
if (ID in watched) {
$.addClass(favicon, 'watched');
} else {
$.rmClass(favicon, 'watched');
}
$[ID in watched ? 'addClass' : 'rmClass'](favicon, 'watched');
}
},
toggleWatcher: function() {

View File

@ -7749,8 +7749,11 @@
var ID, board, div, favicon, id, link, nodes, props, thread, x, _ref, _ref1;
if (!watched) {
$.get('WatchedThreads', {}, function(item) {
return ThreadWatcher.refresh(item['WatchedThreads']);
$.get('WatchedThreads', {}, function(_arg) {
var WatchedThreads;
WatchedThreads = _arg.WatchedThreads;
return ThreadWatcher.refresh(WatchedThreads);
});
return;
}
@ -7779,11 +7782,7 @@
for (ID in _ref1) {
thread = _ref1[ID];
favicon = $('.watch-thread-link', thread.OP.nodes.post);
if (ID in watched) {
$.addClass(favicon, 'watched');
} else {
$.rmClass(favicon, 'watched');
}
$[ID in watched ? 'addClass' : 'rmClass'](favicon, 'watched');
}
},
toggleWatcher: function() {

View File

@ -43,8 +43,8 @@ ThreadWatcher =
refresh: (watched) ->
unless watched
$.get 'WatchedThreads', {}, (item) ->
ThreadWatcher.refresh item['WatchedThreads']
$.get 'WatchedThreads', {}, ({WatchedThreads}) ->
ThreadWatcher.refresh WatchedThreads
return
nodes = [$('.move', ThreadWatcher.dialog)]
for board of watched
@ -67,10 +67,7 @@ ThreadWatcher =
watched = watched[g.BOARD] or {}
for ID, thread of g.BOARD.threads
favicon = $ '.watch-thread-link', thread.OP.nodes.post
if ID of watched
$.addClass favicon, 'watched'
else
$.rmClass favicon, 'watched'
$[if ID of watched then 'addClass' else 'rmClass'] favicon, 'watched'
return
toggleWatcher: ->