To my mind, for the system of JavaScript to be acceptable, each script
installation must be explicitly authorized by the user, unless the user has
decided to place trust in someone, and permanent so that you can keep an old
version; and it needs to be possible to install other scripts in place of the
requested scripts.
But I argue that this would be a wasted effort. We can achieve the same
result of the users being in control of their own scripts by rejecting the
JavaScript requests entirely and using user scripts instead, where it makes
sense to. We can even replace proprietary scripts ourselves via user scripts.
For example, while it is probably not the intention of the developer,
ViewTube works as a libre replacement for YouTube's JavaScript code.
One thing that could be helpful is if we could convert typical JavaScript
code into user scripts. I don't know whether or not this is possible, though,
because I'm not familiar with JavaScript programming, much less the user
script API. Could anyone provide some insight?