From 0265f3605b472412028f9a8c8b0d704ea9f1600d Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 9 Feb 2018 10:06:02 -0800 Subject: [PATCH] Fix 404 redirection on error pages without doctype. #1811 --- src/main/Main.coffee | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/Main.coffee b/src/main/Main.coffee index 5b28c4b6c..e30c61c6f 100644 --- a/src/main/Main.coffee +++ b/src/main/Main.coffee @@ -24,9 +24,6 @@ Main = try return if window.frameElement and window.frameElement.src in ['', 'about:blank'] - # Don't run inside MathJax popups. - return if location.hostname is 'boards.4chan.org' and d.documentElement and not d.doctype - # Detect multiple copies of 4chan X return if doc and $.hasClass(doc, 'fourchan-x') $.asap docSet, -> @@ -276,7 +273,7 @@ Main = , "/#{g.BOARD}/" return - return if d.title in ['4chan - Temporarily Offline', '4chan - 404 Not Found'] + return if d.title in ['4chan - Temporarily Offline', '4chan - 404 Not Found', 'MathJax Equation Source'] if g.VIEW in ['index', 'thread'] and not $('.board + *') msg = $.el 'div', @@ -428,7 +425,7 @@ Main = unless 'thisPageIsLegit' of Main Main.thisPageIsLegit = location.hostname is 'boards.4chan.org' and !$('link[href*="favicon-status.ico"]', d.head) and - d.title not in ['4chan - Temporarily Offline', '4chan - Error', '504 Gateway Time-out'] + d.title not in ['4chan - Temporarily Offline', '4chan - Error', '504 Gateway Time-out', 'MathJax Equation Source'] Main.thisPageIsLegit ready: (cb) ->