return asap

This commit is contained in:
James Campos 2011-04-29 19:43:46 -07:00
parent fa04558a71
commit 0cea48c48b
2 changed files with 24 additions and 23 deletions

View File

@ -2014,7 +2014,6 @@
main = {
init: function() {
var DAY, callback, cutoff, hiddenThreads, id, lastChecked, navtopr, now, pathname, temp, timestamp, tzOffset, _i, _len, _ref2, _ref3;
Favicon.halo = /ws/.test(Favicon["default"]) ? Favicon.haloSFW : Favicon.haloNSFW;
pathname = location.pathname.substring(1).split('/');
g.BOARD = pathname[0], temp = pathname[1];
if (temp === 'res') {
@ -2023,6 +2022,18 @@
} else {
g.PAGENUM = parseInt(temp) || 0;
}
if (location.hostname === 'sys.4chan.org') {
qr.sys();
return;
}
if (navtopr = $('#navtopr')) {
options.init();
} else if ($.config('404 Redirect') && d.title === '4chan - 404' && /^\d+$/.test(g.THREAD_ID)) {
redirect();
} else {
return;
}
Favicon.halo = /ws/.test(Favicon["default"]) ? Favicon.haloSFW : Favicon.haloNSFW;
g.hiddenReplies = $.getValue("hiddenReplies/" + g.BOARD + "/", {});
tzOffset = (new Date()).getTimezoneOffset() / 60;
g.chanOffset = 5 - tzOffset;
@ -2053,17 +2064,6 @@
$.setValue('lastChecked', now);
}
$.addStyle(main.css);
if (location.hostname === 'sys.4chan.org') {
qr.sys();
return;
}
if (navtopr = $('#navtopr')) {
options.init();
} else if ($.config('404 Redirect') && d.title === '4chan - 404' && /^\d+$/.test(g.THREAD_ID)) {
redirect();
} else {
return;
}
Recaptcha.init();
$.bind($('form[name=post]'), 'submit', qr.cb.submit);
if ($.config('Image Expansion')) {

View File

@ -1540,7 +1540,6 @@ g =
main =
init: ->
Favicon.halo = if /ws/.test Favicon.default then Favicon.haloSFW else Favicon.haloNSFW
pathname = location.pathname.substring(1).split('/')
[g.BOARD, temp] = pathname
if temp is 'res'
@ -1548,6 +1547,18 @@ main =
g.THREAD_ID = pathname[2]
else
g.PAGENUM = parseInt(temp) || 0
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
redirect()
else
return
Favicon.halo = if /ws/.test Favicon.default then Favicon.haloSFW else Favicon.haloNSFW
g.hiddenReplies = $.getValue "hiddenReplies/#{g.BOARD}/", {}
tzOffset = (new Date()).getTimezoneOffset() / 60
# GMT -8 is given as +480; would GMT +8 be -480 ?
@ -1575,16 +1586,6 @@ main =
$.addStyle main.css
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
redirect()
else
return
Recaptcha.init()
$.bind $('form[name=post]'), 'submit', qr.cb.submit