diff --git a/src/General/css/style.css b/src/General/css/style.css index bd0f34bde..955fa890b 100755 --- a/src/General/css/style.css +++ b/src/General/css/style.css @@ -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; } diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 6e7f759e7..2ef8f144b 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -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