fix thread watcher position

This commit is contained in:
James Campos 2011-03-12 15:52:36 -08:00
parent 88c88894d4
commit 1ef79b7bdd
2 changed files with 48 additions and 40 deletions

View File

@ -140,6 +140,9 @@
el.className = 'reply dialog';
el.innerHTML = html;
el.id = id;
if (typeof position === 'object') {
left = position.left, top = position.top;
} else {
switch (position) {
case 'topleft':
left = '0px';
@ -161,6 +164,7 @@
left = '50%';
top = '25%';
}
}
left = GM_getValue("" + id + "Left", left);
top = GM_getValue("" + id + "Top", top);
if (left) {
@ -1798,8 +1802,10 @@
}
if (getConfig('Thread Watcher')) {
html = '<div class="move">Thread Watcher</div><div></div>';
watcher = new Dialog('watcher', 'topleft', html).el;
watcher.style.top = '50px';
watcher = new Dialog('watcher', {
top: '50px',
left: '0px'
}, html).el;
mv(watcher, d.body);
watcherUpdate();
threads = g.watched[g.BOARD] || [];

View File

@ -78,6 +78,9 @@ class Dialog
el.className = 'reply dialog'
el.innerHTML = html
el.id = id
if typeof position is 'object'
{left, top} = position
else
switch position
when 'topleft'
left = '0px'
@ -1364,8 +1367,7 @@ if getConfig 'Quick Report'
if getConfig 'Thread Watcher'
#create watcher
html = '<div class="move">Thread Watcher</div><div></div>'
watcher = new Dialog('watcher', 'topleft', html).el
watcher.style.top = '50px' #don't cover the board links
watcher = new Dialog('watcher', top: '50px', left: '0px', html).el
mv watcher, d.body
watcherUpdate()