Fix compatibility with Tampermonkey, close #33

This commit is contained in:
Nicolas Stepien 2011-12-09 14:07:26 +01:00
parent 3024346b94
commit 4cfa27f38c
3 changed files with 5 additions and 4 deletions

View File

@ -3012,7 +3012,7 @@
g.PAGENUM = parseInt(temp) || 0;
}
if (location.hostname === 'sys.4chan.org') {
if (d.body) {
if (/interactive|complete/.test(d.readyState)) {
qr.sys();
} else {
$.on(d, 'DOMContentLoaded', qr.sys);
@ -3054,7 +3054,7 @@
if (conf['Quote Backlinks']) quoteBacklink.init();
if (conf['Indicate OP quote']) quoteOP.init();
if (conf['Indicate Cross-thread Quotes']) quoteDR.init();
if (d.body) {
if (/interactive|complete/.test(d.readyState)) {
return Main.onLoad();
} else {
return $.on(d, 'DOMContentLoaded', Main.onLoad);

View File

@ -1,6 +1,7 @@
master
- mayhem
fix favicon updating on Opera
fix compatibility with Tampermonkey
2.23.0
- mayhem

View File

@ -2328,7 +2328,7 @@ Main =
g.PAGENUM = parseInt(temp) or 0
if location.hostname is 'sys.4chan.org'
if d.body
if /interactive|complete/.test d.readyState
qr.sys()
else
$.on d, 'DOMContentLoaded', qr.sys
@ -2404,7 +2404,7 @@ Main =
quoteDR.init()
if d.body
if /interactive|complete/.test d.readyState
Main.onLoad()
else
$.on d, 'DOMContentLoaded', Main.onLoad