bug-librejs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-librejs] main_background.js - forceNoscriptElements(doc)


From: Denny O'Breham
Subject: [Bug-librejs] main_background.js - forceNoscriptElements(doc)
Date: Sun, 1 Sep 2019 20:42:52 -0400

This is not a bug, but a suggestion for a better UX.

In the function forceNoscriptElements(doc) of main_background.js, the query selector should be noscript:not([data-librejs-display]) instead of noscript:not([data-librejs-nodisplay]).

First, there is no documentation available to inform web developer of the existence of data-librejs-nodisplay. (I had to read the file main_background.js to find it.)

Second, this is bad programming to alter what was programmed by the web developer.  If the _javascript_ version is acceptable, there are no reasons to prefer the non-script version, quite the opposite.  The non-script version is not necessarily equivalent to the _javascript_ version (otherwise why create a _javascript_ version?).

µBlock does force noscript refresh, but only when the _javascript_ is disabled (which is logic).

NoScript does force noscript refresh all the time, which is wrong.

If you do force a noscript refresh, it should be done only if you reject some of the _javascript_ and if the web developer allowed it (data-librejs-display).  Otherwise, you can assume the web developer prefer showing the web page with the partially loaded _javascript_.  Of course, if all _javascript_ is disabled, you might want to redirect to the non-script version (like µBlock does).

In any case, when all _javascript_ is good, never redirect to the non-script version.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]