From 0cea48c48be85d626a7408359a4c5ece033bd36e Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 29 Apr 2011 19:43:46 -0700 Subject: [PATCH] return asap --- 4chan_x.js | 24 ++++++++++++------------ script.coffee | 23 ++++++++++++----------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 6adcbe90a..34c96eb36 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -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')) { diff --git a/script.coffee b/script.coffee index a41b4d130..c35283639 100644 --- a/script.coffee +++ b/script.coffee @@ -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