Replace data-js-enabled attribute with js-enabled CSS class.

This commit is contained in:
ccd0 2015-04-24 07:43:36 -07:00
parent 2e154f21b1
commit 52844cf885
2 changed files with 4 additions and 4 deletions

View File

@ -105,7 +105,7 @@ hr + div.center:not(.ad-cnt):not(.topad):not(.middlead):not(.bottomad) {
/* party hats */
pointer-events: none;
}
:root:not([data-js-enabled]) #postForm {
:root:not(.js-enabled) #postForm {
display: table;
}

View File

@ -9,8 +9,8 @@ QR =
return if g.VIEW is 'archive'
$.globalEval 'document.documentElement.dataset.jsEnabled = true;'
noscript = Conf['Force Noscript Captcha'] or !doc.dataset.jsEnabled
$.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']
$.on d, '4chanXInitFinished', @initReady
@ -37,7 +37,7 @@ QR =
if Conf['Hide Original Post Form']
$.addClass doc, 'hide-original-post-form'
if !doc.dataset.jsEnabled
unless $.hasClass doc, 'js-enabled'
# Prevent unnecessary loading of fallback iframe.
$.onExists doc, '#postForm noscript', true, $.rm