Remove thread watcher toggle

This commit is contained in:
Zixaphir 2013-05-07 19:22:10 -07:00
parent 48bdc81f01
commit 86f9536406
4 changed files with 3 additions and 45 deletions

View File

@ -9424,27 +9424,16 @@
ThreadWatcher = {
init: function() {
var sc;
if (!Conf['Thread Watcher']) {
return;
}
this.shortcut = sc = $.el('a', {
textContent: 'Watcher',
id: 'watcher-link',
href: 'javascript:;',
className: 'disabled'
});
this.dialog = UI.dialog('watcher', 'top: 50px; left: 0px;', '<div class=move>Thread Watcher<a class=close href=javascript:;>×</a></div>');
$.on(d, 'QRPostSuccessful', this.cb.post);
$.sync('WatchedThreads', this.refresh);
$.on(sc, 'click', this.toggleWatcher);
$.on($('.move>.close', ThreadWatcher.dialog), 'click', this.toggleWatcher);
Header.addShortcut(sc);
$.ready(function() {
ThreadWatcher.refresh();
$.add(d.body, ThreadWatcher.dialog);
return ThreadWatcher.dialog.hidden = true;
return $.add(d.body, ThreadWatcher.dialog);
});
return Thread.prototype.callbacks.push({
name: 'Thread Watcher',

View File

@ -9445,27 +9445,16 @@
ThreadWatcher = {
init: function() {
var sc;
if (!Conf['Thread Watcher']) {
return;
}
this.shortcut = sc = $.el('a', {
textContent: 'Watcher',
id: 'watcher-link',
href: 'javascript:;',
className: 'disabled'
});
this.dialog = UI.dialog('watcher', 'top: 50px; left: 0px;', '<div class=move>Thread Watcher<a class=close href=javascript:;>×</a></div>');
$.on(d, 'QRPostSuccessful', this.cb.post);
$.sync('WatchedThreads', this.refresh);
$.on(sc, 'click', this.toggleWatcher);
$.on($('.move>.close', ThreadWatcher.dialog), 'click', this.toggleWatcher);
Header.addShortcut(sc);
$.ready(function() {
ThreadWatcher.refresh();
$.add(d.body, ThreadWatcher.dialog);
return ThreadWatcher.dialog.hidden = true;
return $.add(d.body, ThreadWatcher.dialog);
});
return Thread.prototype.callbacks.push({
name: 'Thread Watcher',

View File

@ -9423,27 +9423,16 @@
ThreadWatcher = {
init: function() {
var sc;
if (!Conf['Thread Watcher']) {
return;
}
this.shortcut = sc = $.el('a', {
textContent: 'Watcher',
id: 'watcher-link',
href: 'javascript:;',
className: 'disabled'
});
this.dialog = UI.dialog('watcher', 'top: 50px; left: 0px;', '<div class=move>Thread Watcher<a class=close href=javascript:;>×</a></div>');
$.on(d, 'QRPostSuccessful', this.cb.post);
$.sync('WatchedThreads', this.refresh);
$.on(sc, 'click', this.toggleWatcher);
$.on($('.move>.close', ThreadWatcher.dialog), 'click', this.toggleWatcher);
Header.addShortcut(sc);
$.ready(function() {
ThreadWatcher.refresh();
$.add(d.body, ThreadWatcher.dialog);
return ThreadWatcher.dialog.hidden = true;
return $.add(d.body, ThreadWatcher.dialog);
});
return Thread.prototype.callbacks.push({
name: 'Thread Watcher',

View File

@ -1,26 +1,17 @@
ThreadWatcher =
init: ->
return unless Conf['Thread Watcher']
@shortcut = sc = $.el 'a',
textContent: 'Watcher'
id: 'watcher-link'
href: 'javascript:;'
className: 'disabled'
@dialog = UI.dialog 'watcher', 'top: 50px; left: 0px;',
'<div class=move>Thread Watcher<a class=close href=javascript:;>×</a></div>'
$.on d, 'QRPostSuccessful', @cb.post
$.sync 'WatchedThreads', @refresh
$.on sc, 'click', @toggleWatcher
$.on $('.move>.close', ThreadWatcher.dialog), 'click', @toggleWatcher
Header.addShortcut sc
$.ready ->
ThreadWatcher.refresh()
$.add d.body, ThreadWatcher.dialog
ThreadWatcher.dialog.hidden = true
Thread::callbacks.push
name: 'Thread Watcher'