Open goozak opened 3 years ago
This bug is also prevalent with <style>
elements which can break entire websites: Try opening a Startpage search with JS disabled by this addon: The results are invisible (!) because of missing noscript styles.
I normally never recommend copying code, but in this case, I think it's best to just use 100% of uBlocks code for this logic, so replace background/content.js
with https://github.com/gorhill/uBlock/blob/2b9aba27489274a42bcc03ae7ac1da3bb33305a9/src/js/scriptlets/noscript-spoof.js and it works fine. This uBlock version also considers xml files and meta refresh inside
Given this HTML:
When JavaScript is disabled via the Switcher, the
<p>
tag is shown as expected, but not the<input>
. If JavaScript is disabled viajavascript.enabled
, the entire<noscript>
is shown (but only if the Switcher is green).