From b877f47b00ba3f615dd77b9cb00f2a71defa0b44 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 4 Jan 2012 16:24:04 +0100 Subject: [PATCH] Return ASAP in images.4chan.org --- 4chan_x.user.js | 10 +++++++++- script.coffee | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 4eb7c8201..fb3ea94ff 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3096,6 +3096,14 @@ $.onLoad(qr.sys); return; } + if (location.hostname === 'images.4chan.org') { + if (conf['404 Redirect']) { + $.onLoad(function() { + if (d.title === '4chan - 404') return redirect.init(); + }); + } + return; + } $.onLoad(options.init); $.on(window, 'message', Main.message); now = Date.now(); @@ -3146,7 +3154,7 @@ redirect.init(); return; } - if (!$('#navtopr') || location.hostname === 'images.4chan.org') return; + if (!$.id('navtopr')) return; $.addClass(d.body, engine); $.addStyle(Main.css); threading.init(); diff --git a/script.coffee b/script.coffee index c856e5624..2077d3f36 100644 --- a/script.coffee +++ b/script.coffee @@ -2397,6 +2397,10 @@ Main = if location.hostname is 'sys.4chan.org' $.onLoad qr.sys return + if location.hostname is 'images.4chan.org' + if conf['404 Redirect'] + $.onLoad -> redirect.init() if d.title is '4chan - 404' + return $.onLoad options.init @@ -2476,7 +2480,7 @@ Main = if conf['404 Redirect'] and d.title is '4chan - 404' redirect.init() return - if not $('#navtopr') or location.hostname is 'images.4chan.org' + if not $.id 'navtopr' return $.addClass d.body, engine $.addStyle Main.css