From be171ab6d1eae5969421d8acc5ba5b429110d6dd Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 3 May 2015 21:02:12 -0700 Subject: [PATCH] Move test for Javascript into Main.coffee. --- src/General/Main.coffee | 3 +++ src/Posting/QR.coffee | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 6de834f61..b0e6fcd5e 100755 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -57,6 +57,9 @@ Main = $.onExists doc, 'body', false, Main.initStyle initFeatures: -> + if location.hostname in ['boards.4chan.org', 'sys.4chan.org'] + $.globalEval 'document.documentElement.classList.add("js-enabled");' + switch location.hostname when 'a.4cdn.org' return diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 413e92ff8..1559e8e62 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -9,7 +9,6 @@ QR = return if g.VIEW is 'archive' - $.globalEval 'document.documentElement.classList.add("js-enabled");' noscript = Conf['Force Noscript Captcha'] or not $.hasClass doc, 'js-enabled' @captcha = Captcha[if noscript then 'noscript' else 'v2']