Replace data-js-enabled attribute with js-enabled CSS class.
This commit is contained in:
parent
2e154f21b1
commit
52844cf885
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user