Live data from Hacker News

Write site-specific extensions to replace sites' JavaScript code

gnu.org

51–60 of 77 posts

Re: Write site-specific extensions to replace sites' JavaScript code

#51
post #28

Perhaps a good start would be to have a standard way to signal the licence of the JavaScript received by the browser. At least users would be able to see it, or only allow the ones with a licence they agree with.

A possible solution: .js files should be hashed and, html should indicate the hashes of the .js files it uses. The browser than could run only scripts from a allowed list.

Re: Write site-specific extensions to replace sites' JavaScript code

#52

Earlier quoted context omitted.

> Trying to encourage people to enter into an endless game of Whac-A-Mole fixing and re-fixing browser extensions to work with sites as they update isn't a solution. Sure it is. This is called adversarial interoperability and it is great: https://www.eff.org/deeplinks/2019/06/adversarial-interopera... People are going to fix bad websites whether or not their owners want them to. This is exactly how ad blockers work a…

user vs developer....users will never do it thus it will fail. they have forgotten the users demographic of free source consumers.

There are many sites out there with enhancement extensions. Sites like the Steam store, reddit, imageboards and probably many others. These things are so useful they replace the default experience. It gets to the point the only thing the sites need to provide is a JSON API for these extensions to consume. The default HTML interface is a fallback for compatibility.

All GNU needs to make is a browser extension that collects custom javascripts for all kinds of sites. One person goes and fixes a popular site? All they need to do is contribute that to the GNU repository. The extension will automatically load the new code when users visit the site.

Re: Write site-specific extensions to replace sites' JavaScript code

#54
post #13

I don't understand this at all? "Many websites damage users' freedom by sending nonfree JavaScript programs to the user's browser." Eh? I'm assuming it means libraries like jquery or alpinejs or analytics etc? Because if I write specific JS for my site, that is not 'free' either. "Otherwise, you need to use the browser debugging facilities to figure out what data and commands the JavaScript code sends to the server—i…

> Erm, no? You've visited my site that I have built, you can either use it as is, or not use it - your choice - but don't start trying to mess about with it and sending stuff, I might be terrible at writing backend side and sending things wrong blows up a server. Just because it's your site, you shouldn't assume that you have the exclusive rights to decide what executable code that should run on my computer. If you d…

I don't think it's a joke at all. A user clicking on a link usually wants to view a page, not getting sent 100's of tracking scripts (or miners, fishers, or whatever), and it's not clear at all the user has given consent or is even aware. Search engines flagging ad- and script-heavy sites would be cool, too.

Re: Write site-specific extensions to replace sites' JavaScript code

#55

Earlier quoted context omitted.

Can you give an example of a widely mocked Stallman statement that has been proven true?

PRISM and all of the problems described in "the right to read" essay. Many other are probably easily found with a bit of research.

You have not actually suggested any concrete statements. I still have no idea what he has said about Prism, the best I got is that he linked to an article from his website.

The Right to Read is certainly interesting, maybe not the best written short story, and it is still quite far from having come true. But it is a nice bucket list of things to be aware of while shaping the future, so points for that one.

Re: Write site-specific extensions to replace sites' JavaScript code

#57
post #13

Earlier quoted context omitted.

> Erm, no? You've visited my site that I have built, you can either use it as is, or not use it - your choice - but don't start trying to mess about with it and sending stuff, I might be terrible at writing backend side and sending things wrong blows up a server. Just because it's your site, you shouldn't assume that you have the exclusive rights to decide what executable code that should run on my computer. If you d…

I don't think it's a joke at all. A user clicking on a link usually wants to view a page, not getting sent 100's of tracking scripts (or miners, fishers, or whatever), and it's not clear at all the user has given consent or is even aware. Search engines flagging ad- and script-heavy sites would be cool, too.

Wouldn't it be much easier to pass laws that would prohibit all these tracking scripts (e.g. GDPR) rather than writing custom Javascript for every individual website out there?

Re: Write site-specific extensions to replace sites' JavaScript code

#58
post #18

Earlier quoted context omitted.

or most of the modding community, wikipedia and much more.

Exactly. Makes me wonder what happened with userscripts lately? Is that community still going? Are there any mechanisms - technological or social - that would let me feel safe about downloading a popular userscript without doing a full-day focused audit of it? I know this can be made to work - modding communities are a perfect example, you can have people dealing with crap and unexpected breakage on a timely basis an…

> Are there any mechanisms - technological or social - that would let me feel safe

Yes: if FSF/GNU (or a similar organization in that orbit) ran their own repository of user scripts, in the vein of distros' package repos.

Re: Write site-specific extensions to replace sites' JavaScript code

#59
post #28

Perhaps a good start would be to have a standard way to signal the licence of the JavaScript received by the browser. At least users would be able to see it, or only allow the ones with a licence they agree with.

You're describing LibreJS, referred to in the opening line of the article as GNU's "first response to the problem of nonfree JS code".

Re: Write site-specific extensions to replace sites' JavaScript code

#60
post #28

Perhaps a good start would be to have a standard way to signal the licence of the JavaScript received by the browser. At least users would be able to see it, or only allow the ones with a licence they agree with.

You're describing LibreJS, referred to in the opening line of the article as GNU's "first response to the problem of nonfree JS code".

No, I'm speaking about a W3C standard, and not about a web browser extension.

I want a website to say in the html, so any browser can use it, and let the user decide.

LibreJS is just a allow-list extension on a per-website basis.

Post reply on HN