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 */
|
/* party hats */
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
:root:not([data-js-enabled]) #postForm {
|
:root:not(.js-enabled) #postForm {
|
||||||
display: table;
|
display: table;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,8 +9,8 @@ QR =
|
|||||||
|
|
||||||
return if g.VIEW is 'archive'
|
return if g.VIEW is 'archive'
|
||||||
|
|
||||||
$.globalEval 'document.documentElement.dataset.jsEnabled = true;'
|
$.globalEval 'document.documentElement.classList.add("js-enabled");'
|
||||||
noscript = Conf['Force Noscript Captcha'] or !doc.dataset.jsEnabled
|
noscript = Conf['Force Noscript Captcha'] or not $.hasClass doc, 'js-enabled'
|
||||||
@captcha = Captcha[if noscript then 'noscript' else 'v2']
|
@captcha = Captcha[if noscript then 'noscript' else 'v2']
|
||||||
|
|
||||||
$.on d, '4chanXInitFinished', @initReady
|
$.on d, '4chanXInitFinished', @initReady
|
||||||
@ -37,7 +37,7 @@ QR =
|
|||||||
|
|
||||||
if Conf['Hide Original Post Form']
|
if Conf['Hide Original Post Form']
|
||||||
$.addClass doc, '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.
|
# Prevent unnecessary loading of fallback iframe.
|
||||||
$.onExists doc, '#postForm noscript', true, $.rm
|
$.onExists doc, '#postForm noscript', true, $.rm
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user