LibreJS and noscript

<noscript> activates some HTML material when JavaScript is totally disabled; but with LibreJS blocking nontrivial nonfree JavaScript (and allowing the rest to operate), <noscript> is false. So if you fix a page with <noscript> conditionals, it will still fail with LibreJS.

Here's the way to make the no-JS material active in the two cases where it is needed:

Here's what you use instead of <noscript>...</noscript>:


<div class="showonlibrejs">
<p>This only shows if LibreJS is active
or if JavaScript is disabled.</p>
</div>

Here's some JavaScript code to make that work:


<script>
// this script goes at the end of the document
[].forEach.call(document.querySelectorAll('.showonlibrejs'),
function (el) {
el.style.visibility = 'hidden';
});
eval(""); // this makes the script non-trivial.
</script>