add options at the end of main
makes bug-finding easier - if the options show up, we know that main completed successfully.
This commit is contained in:
parent
0cea48c48b
commit
dfb80ef16a
13
4chan_x.js
13
4chan_x.js
@ -2013,7 +2013,7 @@
|
||||
};
|
||||
main = {
|
||||
init: function() {
|
||||
var DAY, callback, cutoff, hiddenThreads, id, lastChecked, navtopr, now, pathname, temp, timestamp, tzOffset, _i, _len, _ref2, _ref3;
|
||||
var DAY, callback, cutoff, hiddenThreads, id, lastChecked, now, pathname, temp, timestamp, tzOffset, _i, _len, _ref2, _ref3;
|
||||
pathname = location.pathname.substring(1).split('/');
|
||||
g.BOARD = pathname[0], temp = pathname[1];
|
||||
if (temp === 'res') {
|
||||
@ -2026,11 +2026,11 @@
|
||||
qr.sys();
|
||||
return;
|
||||
}
|
||||
if (navtopr = $('#navtopr')) {
|
||||
options.init();
|
||||
} else if ($.config('404 Redirect') && d.title === '4chan - 404' && /^\d+$/.test(g.THREAD_ID)) {
|
||||
if ($.config('404 Redirect') && d.title === '4chan - 404' && /^\d+$/.test(g.THREAD_ID)) {
|
||||
redirect();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (!$('#navtopr')) {
|
||||
return;
|
||||
}
|
||||
Favicon.halo = /ws/.test(Favicon["default"]) ? Favicon.haloSFW : Favicon.haloNSFW;
|
||||
@ -2138,7 +2138,8 @@
|
||||
callback = _ref3[_i];
|
||||
callback();
|
||||
}
|
||||
return $.bind(d.body, 'DOMNodeInserted', nodeInserted);
|
||||
$.bind(d.body, 'DOMNodeInserted', nodeInserted);
|
||||
return options.init();
|
||||
},
|
||||
css: '\
|
||||
/* dialog styling */\
|
||||
|
||||
@ -1551,11 +1551,10 @@ main =
|
||||
if location.hostname is 'sys.4chan.org'
|
||||
qr.sys()
|
||||
return
|
||||
if navtopr = $ '#navtopr'
|
||||
options.init()
|
||||
else if $.config('404 Redirect') and d.title is '4chan - 404' and /^\d+$/.test g.THREAD_ID
|
||||
if $.config('404 Redirect') and d.title is '4chan - 404' and /^\d+$/.test g.THREAD_ID
|
||||
redirect()
|
||||
else
|
||||
return
|
||||
if not $ '#navtopr'
|
||||
return
|
||||
|
||||
Favicon.halo = if /ws/.test Favicon.default then Favicon.haloSFW else Favicon.haloNSFW
|
||||
@ -1660,6 +1659,7 @@ main =
|
||||
|
||||
callback() for callback in g.callbacks
|
||||
$.bind d.body, 'DOMNodeInserted', nodeInserted
|
||||
options.init()
|
||||
|
||||
css: '
|
||||
/* dialog styling */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user