Move test for Javascript into Main.coffee.

This commit is contained in:
ccd0 2015-05-03 21:02:12 -07:00
parent 4ee4c3c10d
commit be171ab6d1
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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']