Merge pull request #166 from aeosynth/161

fix #161
This commit is contained in:
Mayhem 2012-02-05 04:57:14 -08:00
commit 7b38d128b0
3 changed files with 29 additions and 6 deletions

View File

@ -1204,7 +1204,6 @@
}); });
$.on($('a', link), 'click', qr.open); $.on($('a', link), 'click', qr.open);
form = d.forms[0]; form = d.forms[0];
form.hidden = true;
$.before(form, link); $.before(form, link);
} }
g.callbacks.push(function(root) { g.callbacks.push(function(root) {
@ -3494,6 +3493,10 @@
if (conf['Quote Backlinks']) quoteBacklink.init(); if (conf['Quote Backlinks']) quoteBacklink.init();
if (conf['Indicate OP quote']) quoteOP.init(); if (conf['Indicate OP quote']) quoteOP.init();
if (conf['Indicate Cross-thread Quotes']) quoteDR.init(); if (conf['Indicate Cross-thread Quotes']) quoteDR.init();
if (conf['Quick Reply'] && conf['Hide Original Post Form']) {
Main.css += 'form[name=post] { display: none; }';
}
Main.addStyle();
return $.ready(Main.ready); return $.ready(Main.ready);
}, },
ready: function() { ready: function() {
@ -3504,7 +3507,6 @@
} }
if (!$.id('navtopr')) return; if (!$.id('navtopr')) return;
$.addClass(d.body, engine); $.addClass(d.body, engine);
$.addStyle(Main.css);
threading.init(); threading.init();
Favicon.init(); Favicon.init();
if (conf['Quick Reply']) qr.init(); if (conf['Quick Reply']) qr.init();
@ -3539,6 +3541,14 @@
} }
return $.on(form, 'DOMNodeInserted', Main.node); return $.on(form, 'DOMNodeInserted', Main.node);
}, },
addStyle: function() {
$.off(d, 'DOMNodeInserted', Main.addStyle);
if (d.head) {
return $.addStyle(Main.css);
} else {
return $.on(d, 'DOMNodeInserted', Main.addStyle);
}
},
message: function(e) { message: function(e) {
var data, version; var data, version;
data = e.data; data = e.data;
@ -3894,7 +3904,8 @@ img[md5], img[md5] + img {\
}\ }\
.filtered {\ .filtered {\
text-decoration: line-through;\ text-decoration: line-through;\
}' }\
'
}; };
Main.init(); Main.init();

View File

@ -1,4 +1,6 @@
master master
- aeosynth
prevent post form flicker
- Mayhem - Mayhem
Increase Sauce linking possibilites: Increase Sauce linking possibilites:
Thumbnails, full images, MD5 hashes. Thumbnails, full images, MD5 hashes.

View File

@ -871,7 +871,6 @@ qr =
link = $.el 'h1', innerHTML: "<a href=javascript:;>#{if g.REPLY then 'Open the Quick Reply' else 'Create a New Thread'}</a>" link = $.el 'h1', innerHTML: "<a href=javascript:;>#{if g.REPLY then 'Open the Quick Reply' else 'Create a New Thread'}</a>"
$.on $('a', link), 'click', qr.open $.on $('a', link), 'click', qr.open
form = d.forms[0] form = d.forms[0]
form.hidden = true
$.before form, link $.before form, link
g.callbacks.push (root) -> g.callbacks.push (root) ->
$.on $('.quotejs + .quotejs', root), 'click', qr.quote $.on $('.quotejs + .quotejs', root), 'click', qr.quote
@ -2730,6 +2729,10 @@ Main =
if conf['Indicate Cross-thread Quotes'] if conf['Indicate Cross-thread Quotes']
quoteDR.init() quoteDR.init()
if conf['Quick Reply'] and conf['Hide Original Post Form']
Main.css += 'form[name=post] { display: none; }'
Main.addStyle()
$.ready Main.ready $.ready Main.ready
@ -2740,7 +2743,6 @@ Main =
if not $.id 'navtopr' if not $.id 'navtopr'
return return
$.addClass d.body, engine $.addClass d.body, engine
$.addStyle Main.css
threading.init() threading.init()
Favicon.init() Favicon.init()
@ -2797,6 +2799,13 @@ Main =
alert err alert err
$.on form, 'DOMNodeInserted', Main.node $.on form, 'DOMNodeInserted', Main.node
addStyle: ->
$.off d, 'DOMNodeInserted', Main.addStyle
if d.head
$.addStyle Main.css
else # XXX fox
$.on d, 'DOMNodeInserted', Main.addStyle
message: (e) -> message: (e) ->
{data} = e {data} = e
{version} = data {version} = data
@ -3143,6 +3152,7 @@ img[md5], img[md5] + img {
} }
.filtered { .filtered {
text-decoration: line-through; text-decoration: line-through;
}' }
'
Main.init() Main.init()