diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index f39e560db..ecd1e356c 100755 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1370,10 +1370,7 @@ })(); Polyfill = { - init: function() { - Polyfill.toBlob(); - return Polyfill.visibility(); - }, + init: function() {}, toBlob: function() { var _base; return (_base = HTMLCanvasElement.prototype).toBlob || (_base.toBlob = function(cb) { @@ -1413,10 +1410,10 @@ Header = { init: function() { - var barFixedToggler, barPositionToggler, customNavToggler, editCustomNav, footerToggler, headerToggler, linkJustifyToggler, + var barFixedToggler, barPositionToggler, customNavToggler, editCustomNav, footerToggler, headerToggler, linkJustifyToggler, menuButton, _this = this; this.menu = new UI.Menu('header'); - this.menuButton = $.el('span', { + menuButton = $.el('span', { className: 'menu-button', innerHTML: '' }); @@ -1448,7 +1445,7 @@ this.headerToggler = headerToggler.firstElementChild; this.footerToggler = footerToggler.firstElementChild; this.customNavToggler = customNavToggler.firstElementChild; - $.on(this.menuButton, 'click', this.menuToggle); + $.on(menuButton, 'click', this.menuToggle); $.on(this.barFixedToggler, 'change', this.toggleBarFixed); $.on(this.barPositionToggler, 'change', this.toggleBarPosition); $.on(this.linkJustifyToggler, 'change', this.toggleLinkJustify); @@ -1463,7 +1460,7 @@ $.sync('Bottom Header', Header.setBarPosition); $.sync('Header auto-hide', Header.setBarVisibility); $.sync('Centered links', Header.setLinkJustify); - this.addShortcut(Header.menuButton); + this.addShortcut(menuButton); $.event('AddMenuEntry', { type: 'header', el: $.el('span', { @@ -1963,6 +1960,9 @@ threadFromRoot: function(root) { return g.threads["" + g.BOARD + "." + root.id.slice(1)]; }, + threadFromNode: function(node) { + return Get.threadFromRoot($.x('ancestor::div[@class="thread"]', node)); + }, postFromRoot: function(root) { var boardID, index, link, post, postID; link = $('a[title="Highlight this post"]', root); @@ -1979,8 +1979,8 @@ postFromNode: function(root) { return Get.postFromRoot($.x('(ancestor::div[contains(@class,"postContainer")][1]|following::div[contains(@class,"postContainer")][1])', root)); }, - contextFromNode: function(quotelink) { - return Get.postFromRoot($.x('ancestor::div[parent::div[@class="thread"]][1]', quotelink)); + contextFromNode: function(node) { + return Get.postFromRoot($.x('ancestor::div[parent::div[@class="thread"]][1]', node)); }, postDataFromLink: function(link) { var boardID, path, postID, threadID, _ref; @@ -2413,7 +2413,7 @@ }; Menu.prototype.focus = function(entry) { - var bottom, cHeight, cWidth, eRect, focused, left, right, sRect, style, submenu, top, _i, _len, _ref, _ref1, _ref2; + var cHeight, cWidth, eRect, focused, sRect, submenu, _i, _len, _ref; while (focused = $.x('parent::*/child::*[contains(@class,"focused")]', entry)) { $.rmClass(focused, 'focused'); } @@ -2430,13 +2430,20 @@ eRect = entry.getBoundingClientRect(); cHeight = doc.clientHeight; cWidth = doc.clientWidth; - _ref1 = eRect.top + sRect.height < cHeight ? ['0px', 'auto'] : ['auto', '0px'], top = _ref1[0], bottom = _ref1[1]; - _ref2 = eRect.right + sRect.width < cWidth ? ['100%', 'auto'] : ['auto', '100%'], left = _ref2[0], right = _ref2[1]; - style = submenu.style; - style.top = top; - style.bottom = bottom; - style.left = left; - return style.right = right; + if (eRect.top + sRect.height < cHeight) { + $.addClass(submenu, 'top'); + $.rmClass(submenu, 'bottom'); + } else { + $.addClass(submenu, 'bottom'); + $.rmClass(submenu, 'top'); + } + if (eRect.right + sRect.width < cWidth) { + $.addClass(submenu, 'left'); + return $.rmClass(submenu, 'right'); + } else { + $.addClass(submenu, 'right'); + return $.rmClass(submenu, 'left'); + } }; Menu.prototype.addEntry = function(e) { @@ -3202,7 +3209,7 @@ post.nodes.stub = $.el('div', { className: 'stub' }); - $.add(post.nodes.stub, !Conf['Menu'] ? a : [a, $.tn(' '), button = Menu.makeButton(post)]); + $.add(post.nodes.stub, Conf['Menu'] ? [a, $.tn(' '), button = Menu.makeButton(post)] : a); return $.prepend(post.nodes.root, post.nodes.stub); }, show: function(post, showRecursively) { @@ -3516,7 +3523,7 @@ return ThreadHiding.saveHiddenState(thread); }, hide: function(thread, makeStub) { - var OP, a, button, numReplies, opInfo, span, threadRoot; + var OP, a, numReplies, opInfo, span, threadRoot; if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3535,7 +3542,7 @@ thread.stub = $.el('div', { className: 'stub' }); - $.add(thread.stub, !Conf['Menu'] ? a : [a, $.tn(' '), button = Menu.makeButton(OP)]); + $.add(thread.stub, Conf['Menu'] ? [a, $.tn(' '), Menu.makeButton()] : a); return $.prepend(threadRoot, thread.stub); }, show: function(thread) { @@ -3640,25 +3647,22 @@ }); }, node: function() { - var board, boardID, quotelink, quotelinks, quotes, thread, threadID, _i, _len, _ref, _ref1; + var board, boardID, quotelink, thread, threadID, _i, _len, _ref, _ref1, _ref2; if (this.isClone && this.thread === this.context.thread) { return; } - if (!(quotes = this.quotes).length) { - return; - } - quotelinks = this.nodes.quotelinks; _ref = this.isClone ? this.context : this, board = _ref.board, thread = _ref.thread; - for (_i = 0, _len = quotelinks.length; _i < _len; _i++) { - quotelink = quotelinks[_i]; - _ref1 = Get.postDataFromLink(quotelink), boardID = _ref1.boardID, threadID = _ref1.threadID; + _ref1 = this.nodes.quotelinks; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + quotelink = _ref1[_i]; + _ref2 = Get.postDataFromLink(quotelink), boardID = _ref2.boardID, threadID = _ref2.threadID; if (!threadID) { continue; } if (this.isClone) { quotelink.textContent = quotelink.textContent.replace(QuoteCT.text, ''); } - if (boardID === this.board.ID && threadID !== thread.ID) { + if (boardID === board.ID && threadID !== thread.ID) { $.add(quotelink, $.tn(QuoteCT.text)); } } @@ -3800,7 +3804,7 @@ }); }, node: function() { - var boardID, op, postID, quotelink, quotelinks, quotes, _i, _j, _len, _len1, _ref; + var boardID, fullID, i, postID, quotelink, quotelinks, quotes, _ref; if (this.isClone && this.thread === this.context.thread) { return; } @@ -3809,19 +3813,19 @@ } quotelinks = this.nodes.quotelinks; if (this.isClone && quotes.contains(this.thread.fullID)) { - for (_i = 0, _len = quotelinks.length; _i < _len; _i++) { - quotelink = quotelinks[_i]; + i = 0; + while (quotelink = quotelinks[i++]) { quotelink.textContent = quotelink.textContent.replace(QuoteOP.text, ''); } } - op = (this.isClone ? this.context : this).thread.fullID; - if (!quotes.contains(op)) { + fullID = (this.isClone ? this.context : this).thread.fullID; + if (!quotes.contains(fullID)) { return; } - for (_j = 0, _len1 = quotelinks.length; _j < _len1; _j++) { - quotelink = quotelinks[_j]; + i = 0; + while (quotelink = quotelinks[i++]) { _ref = Get.postDataFromLink(quotelink), boardID = _ref.boardID, postID = _ref.postID; - if (("" + boardID + "." + postID) === op) { + if (("" + boardID + "." + postID) === fullID) { $.add(quotelink, $.tn(QuoteOP.text)); } } @@ -5170,7 +5174,7 @@ } _ref = QR.nodes, com = _ref.com, thread = _ref.thread; if (!com.value) { - thread.value = Get.contextFromNode(this).thread; + thread.value = Get.threadFromNode(this); } caretPos = com.selectionStart; com.value = com.value.slice(0, caretPos) + text + com.value.slice(com.selectionEnd); @@ -6121,7 +6125,7 @@ href: 'javascript:;' }); $.on(this.EAI, 'click', ImageExpand.cb.toggleAll); - Header.addShortcut(this.EAI); + Header.addShortcut(this.EAI, 2); return Post.prototype.callbacks.push({ name: 'Image Expansion', cb: this.node @@ -6834,45 +6838,44 @@ } }; - Menu = (function() { - var a; - a = $.el('a', { - className: 'menu-button brackets-wrap', - innerHTML: '', - href: 'javascript:;' - }); - return { - init: function() { - if (g.VIEW === 'catalog' || !Conf['Menu']) { - return; - } - this.menu = new UI.Menu('post'); - return Post.prototype.callbacks.push({ - name: 'Menu', - cb: this.node - }); - }, - node: function() { - var button; - if (this.isClone) { - button = $('.menu-button', this.nodes.info); - } else { - button = a.cloneNode(true); - $.add(this.nodes.info, [$.tn('\u00A0'), button]); - } - return $.on(button, 'click', Menu.toggle); - }, - makeButton: function() { - var el; - el = a.cloneNode(true); - $.on(el, 'click', Menu.toggle); - return el; - }, - toggle: function(e) { - return Menu.menu.toggle(e, this, Get.postFromNode(this)); + Menu = { + init: function() { + if (g.VIEW === 'catalog' || !Conf['Menu']) { + return; } - }; - })(); + this.menu = new UI.Menu('post'); + return Post.prototype.callbacks.push({ + name: 'Menu', + cb: this.node + }); + }, + node: function() { + if (this.isClone) { + return $.on($('.menu-button', this.nodes.info), 'click', Menu.toggle); + } else { + return $.add(this.nodes.info, [$.tn('\u00A0'), Menu.makeButton()]); + } + }, + makeButton: (function() { + var a; + a = $.el('a', { + className: 'menu-button brackets-wrap', + innerHTML: '', + href: 'javascript:;' + }); + return function() { + var button; + button = a.cloneNode(true); + $.on(button, 'click', Menu.toggle); + return button; + }; + })(), + toggle: function(e) { + var post; + post = Get.postFromNode(this); + return Menu.menu.toggle(e, this, post); + } + }; ReportLink = { init: function() { @@ -7629,11 +7632,13 @@ fetching: 0 }, fetchAllStatus: function() { - var thread, _i, _len, _ref; + var thread, threads, _i, _len; + if (!(threads = ThreadWatcher.getAll()).length) { + return; + } ThreadWatcher.status.textContent = '...'; - _ref = ThreadWatcher.getAll(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - thread = _ref[_i]; + for (_i = 0, _len = threads.length; _i < _len; _i++) { + thread = threads[_i]; ThreadWatcher.fetchStatus(thread); } }, @@ -8778,7 +8783,7 @@ return ("" + status + " " + posts + " post" + (posts > 1 ? 's' : '')) + (+files ? " and " + files + " image repl" + (files > 1 ? 'ies' : 'y') : "") + (" " + (status === '-' ? 'shown' : 'omitted') + "."); }, cbToggle: function() { - return ExpandThread.toggle(Get.threadFromRoot(this.parentNode)); + return ExpandThread.toggle(Get.threadFromNode(this)); }, toggle: function(thread) { var a, files, filesCount, inlined, num, post, posts, postsCount, reply, threadRoot, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3, _ref4; @@ -10378,7 +10383,6 @@ } Conf['selectedArchives'] = {}; Conf['CachedTitles'] = []; - Conf['archives'] = Redirect.archives; $.get(Conf, function(items) { $.extend(Conf, items); return Main.initFeatures(); @@ -10551,7 +10555,7 @@ }, initReady: function() { var board, err, errors, href, passLink, postRoot, posts, styleSelector, thread, threadRoot, threads, _i, _j, _len, _len1, _ref, _ref1; - if (d.title === '4chan - 404 Not Found') { + if (['4chan - Temporarily Offline', '4chan - 404 Not Found'].contains(d.title)) { if (Conf['404 Redirect'] && g.VIEW === 'thread') { href = Redirect.to('thread', { boardID: g.BOARD.ID, diff --git a/builds/crx/script.js b/builds/crx/script.js index ee8910ae1..c13e630c1 100755 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1426,10 +1426,10 @@ Header = { init: function() { - var barFixedToggler, barPositionToggler, customNavToggler, editCustomNav, footerToggler, headerToggler, linkJustifyToggler, + var barFixedToggler, barPositionToggler, customNavToggler, editCustomNav, footerToggler, headerToggler, linkJustifyToggler, menuButton, _this = this; this.menu = new UI.Menu('header'); - this.menuButton = $.el('span', { + menuButton = $.el('span', { className: 'menu-button', innerHTML: '' }); @@ -1461,7 +1461,7 @@ this.headerToggler = headerToggler.firstElementChild; this.footerToggler = footerToggler.firstElementChild; this.customNavToggler = customNavToggler.firstElementChild; - $.on(this.menuButton, 'click', this.menuToggle); + $.on(menuButton, 'click', this.menuToggle); $.on(this.barFixedToggler, 'change', this.toggleBarFixed); $.on(this.barPositionToggler, 'change', this.toggleBarPosition); $.on(this.linkJustifyToggler, 'change', this.toggleLinkJustify); @@ -1476,7 +1476,7 @@ $.sync('Bottom Header', Header.setBarPosition); $.sync('Header auto-hide', Header.setBarVisibility); $.sync('Centered links', Header.setLinkJustify); - this.addShortcut(Header.menuButton); + this.addShortcut(menuButton); $.event('AddMenuEntry', { type: 'header', el: $.el('span', { @@ -1976,6 +1976,9 @@ threadFromRoot: function(root) { return g.threads["" + g.BOARD + "." + root.id.slice(1)]; }, + threadFromNode: function(node) { + return Get.threadFromRoot($.x('ancestor::div[@class="thread"]', node)); + }, postFromRoot: function(root) { var boardID, index, link, post, postID; link = $('a[title="Highlight this post"]', root); @@ -1992,8 +1995,8 @@ postFromNode: function(root) { return Get.postFromRoot($.x('(ancestor::div[contains(@class,"postContainer")][1]|following::div[contains(@class,"postContainer")][1])', root)); }, - contextFromNode: function(quotelink) { - return Get.postFromRoot($.x('ancestor::div[parent::div[@class="thread"]][1]', quotelink)); + contextFromNode: function(node) { + return Get.postFromRoot($.x('ancestor::div[parent::div[@class="thread"]][1]', node)); }, postDataFromLink: function(link) { var boardID, path, postID, threadID, _ref; @@ -2426,7 +2429,7 @@ }; Menu.prototype.focus = function(entry) { - var bottom, cHeight, cWidth, eRect, focused, left, right, sRect, style, submenu, top, _i, _len, _ref, _ref1, _ref2; + var cHeight, cWidth, eRect, focused, sRect, submenu, _i, _len, _ref; while (focused = $.x('parent::*/child::*[contains(@class,"focused")]', entry)) { $.rmClass(focused, 'focused'); } @@ -2443,13 +2446,20 @@ eRect = entry.getBoundingClientRect(); cHeight = doc.clientHeight; cWidth = doc.clientWidth; - _ref1 = eRect.top + sRect.height < cHeight ? ['0px', 'auto'] : ['auto', '0px'], top = _ref1[0], bottom = _ref1[1]; - _ref2 = eRect.right + sRect.width < cWidth ? ['100%', 'auto'] : ['auto', '100%'], left = _ref2[0], right = _ref2[1]; - style = submenu.style; - style.top = top; - style.bottom = bottom; - style.left = left; - return style.right = right; + if (eRect.top + sRect.height < cHeight) { + $.addClass(submenu, 'top'); + $.rmClass(submenu, 'bottom'); + } else { + $.addClass(submenu, 'bottom'); + $.rmClass(submenu, 'top'); + } + if (eRect.right + sRect.width < cWidth) { + $.addClass(submenu, 'left'); + return $.rmClass(submenu, 'right'); + } else { + $.addClass(submenu, 'right'); + return $.rmClass(submenu, 'left'); + } }; Menu.prototype.addEntry = function(e) { @@ -3208,7 +3218,7 @@ post.nodes.stub = $.el('div', { className: 'stub' }); - $.add(post.nodes.stub, !Conf['Menu'] ? a : [a, $.tn(' '), button = Menu.makeButton(post)]); + $.add(post.nodes.stub, Conf['Menu'] ? [a, $.tn(' '), button = Menu.makeButton(post)] : a); return $.prepend(post.nodes.root, post.nodes.stub); }, show: function(post, showRecursively) { @@ -3522,7 +3532,7 @@ return ThreadHiding.saveHiddenState(thread); }, hide: function(thread, makeStub) { - var OP, a, button, numReplies, opInfo, span, threadRoot; + var OP, a, numReplies, opInfo, span, threadRoot; if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3541,7 +3551,7 @@ thread.stub = $.el('div', { className: 'stub' }); - $.add(thread.stub, !Conf['Menu'] ? a : [a, $.tn(' '), button = Menu.makeButton(OP)]); + $.add(thread.stub, Conf['Menu'] ? [a, $.tn(' '), Menu.makeButton()] : a); return $.prepend(threadRoot, thread.stub); }, show: function(thread) { @@ -3646,25 +3656,22 @@ }); }, node: function() { - var board, boardID, quotelink, quotelinks, quotes, thread, threadID, _i, _len, _ref, _ref1; + var board, boardID, quotelink, thread, threadID, _i, _len, _ref, _ref1, _ref2; if (this.isClone && this.thread === this.context.thread) { return; } - if (!(quotes = this.quotes).length) { - return; - } - quotelinks = this.nodes.quotelinks; _ref = this.isClone ? this.context : this, board = _ref.board, thread = _ref.thread; - for (_i = 0, _len = quotelinks.length; _i < _len; _i++) { - quotelink = quotelinks[_i]; - _ref1 = Get.postDataFromLink(quotelink), boardID = _ref1.boardID, threadID = _ref1.threadID; + _ref1 = this.nodes.quotelinks; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + quotelink = _ref1[_i]; + _ref2 = Get.postDataFromLink(quotelink), boardID = _ref2.boardID, threadID = _ref2.threadID; if (!threadID) { continue; } if (this.isClone) { quotelink.textContent = quotelink.textContent.replace(QuoteCT.text, ''); } - if (boardID === this.board.ID && threadID !== thread.ID) { + if (boardID === board.ID && threadID !== thread.ID) { $.add(quotelink, $.tn(QuoteCT.text)); } } @@ -3806,7 +3813,7 @@ }); }, node: function() { - var boardID, op, postID, quotelink, quotelinks, quotes, _i, _j, _len, _len1, _ref; + var boardID, fullID, i, postID, quotelink, quotelinks, quotes, _ref; if (this.isClone && this.thread === this.context.thread) { return; } @@ -3815,19 +3822,19 @@ } quotelinks = this.nodes.quotelinks; if (this.isClone && quotes.contains(this.thread.fullID)) { - for (_i = 0, _len = quotelinks.length; _i < _len; _i++) { - quotelink = quotelinks[_i]; + i = 0; + while (quotelink = quotelinks[i++]) { quotelink.textContent = quotelink.textContent.replace(QuoteOP.text, ''); } } - op = (this.isClone ? this.context : this).thread.fullID; - if (!quotes.contains(op)) { + fullID = (this.isClone ? this.context : this).thread.fullID; + if (!quotes.contains(fullID)) { return; } - for (_j = 0, _len1 = quotelinks.length; _j < _len1; _j++) { - quotelink = quotelinks[_j]; + i = 0; + while (quotelink = quotelinks[i++]) { _ref = Get.postDataFromLink(quotelink), boardID = _ref.boardID, postID = _ref.postID; - if (("" + boardID + "." + postID) === op) { + if (("" + boardID + "." + postID) === fullID) { $.add(quotelink, $.tn(QuoteOP.text)); } } @@ -5177,7 +5184,7 @@ } _ref = QR.nodes, com = _ref.com, thread = _ref.thread; if (!com.value) { - thread.value = Get.contextFromNode(this).thread; + thread.value = Get.threadFromNode(this); } caretPos = com.selectionStart; com.value = com.value.slice(0, caretPos) + text + com.value.slice(com.selectionEnd); @@ -6103,7 +6110,7 @@ href: 'javascript:;' }); $.on(this.EAI, 'click', ImageExpand.cb.toggleAll); - Header.addShortcut(this.EAI); + Header.addShortcut(this.EAI, 2); return Post.prototype.callbacks.push({ name: 'Image Expansion', cb: this.node @@ -6816,45 +6823,44 @@ } }; - Menu = (function() { - var a; - a = $.el('a', { - className: 'menu-button brackets-wrap', - innerHTML: '', - href: 'javascript:;' - }); - return { - init: function() { - if (g.VIEW === 'catalog' || !Conf['Menu']) { - return; - } - this.menu = new UI.Menu('post'); - return Post.prototype.callbacks.push({ - name: 'Menu', - cb: this.node - }); - }, - node: function() { - var button; - if (this.isClone) { - button = $('.menu-button', this.nodes.info); - } else { - button = a.cloneNode(true); - $.add(this.nodes.info, [$.tn('\u00A0'), button]); - } - return $.on(button, 'click', Menu.toggle); - }, - makeButton: function() { - var el; - el = a.cloneNode(true); - $.on(el, 'click', Menu.toggle); - return el; - }, - toggle: function(e) { - return Menu.menu.toggle(e, this, Get.postFromNode(this)); + Menu = { + init: function() { + if (g.VIEW === 'catalog' || !Conf['Menu']) { + return; } - }; - })(); + this.menu = new UI.Menu('post'); + return Post.prototype.callbacks.push({ + name: 'Menu', + cb: this.node + }); + }, + node: function() { + if (this.isClone) { + return $.on($('.menu-button', this.nodes.info), 'click', Menu.toggle); + } else { + return $.add(this.nodes.info, [$.tn('\u00A0'), Menu.makeButton()]); + } + }, + makeButton: (function() { + var a; + a = $.el('a', { + className: 'menu-button brackets-wrap', + innerHTML: '', + href: 'javascript:;' + }); + return function() { + var button; + button = a.cloneNode(true); + $.on(button, 'click', Menu.toggle); + return button; + }; + })(), + toggle: function(e) { + var post; + post = Get.postFromNode(this); + return Menu.menu.toggle(e, this, post); + } + }; ReportLink = { init: function() { @@ -7611,11 +7617,13 @@ fetching: 0 }, fetchAllStatus: function() { - var thread, _i, _len, _ref; + var thread, threads, _i, _len; + if (!(threads = ThreadWatcher.getAll()).length) { + return; + } ThreadWatcher.status.textContent = '...'; - _ref = ThreadWatcher.getAll(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - thread = _ref[_i]; + for (_i = 0, _len = threads.length; _i < _len; _i++) { + thread = threads[_i]; ThreadWatcher.fetchStatus(thread); } }, @@ -8765,7 +8773,7 @@ return ("" + status + " " + posts + " post" + (posts > 1 ? 's' : '')) + (+files ? " and " + files + " image repl" + (files > 1 ? 'ies' : 'y') : "") + (" " + (status === '-' ? 'shown' : 'omitted') + "."); }, cbToggle: function() { - return ExpandThread.toggle(Get.threadFromRoot(this.parentNode)); + return ExpandThread.toggle(Get.threadFromNode(this)); }, toggle: function(thread) { var a, files, filesCount, inlined, num, post, posts, postsCount, reply, threadRoot, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3, _ref4; @@ -10363,7 +10371,6 @@ } Conf['selectedArchives'] = {}; Conf['CachedTitles'] = []; - Conf['archives'] = Redirect.archives; $.get(Conf, function(items) { $.extend(Conf, items); if (!items) { @@ -10545,7 +10552,7 @@ }, initReady: function() { var board, err, errors, href, passLink, postRoot, posts, styleSelector, thread, threadRoot, threads, _i, _j, _len, _len1, _ref, _ref1; - if (d.title === '4chan - 404 Not Found') { + if (['4chan - Temporarily Offline', '4chan - 404 Not Found'].contains(d.title)) { if (Conf['404 Redirect'] && g.VIEW === 'thread') { href = Redirect.to('thread', { boardID: g.BOARD.ID, diff --git a/html/General/Header.html b/html/General/Header.html new file mode 100644 index 000000000..2e0088f42 --- /dev/null +++ b/html/General/Header.html @@ -0,0 +1,9 @@ +