12

Why use .js extension if it does not even support what Javascript is supposed to support. Here is my user.js file that does not work in Firefox: https://pastebin.com/QZXL0YJp

However the following works: https://pastebin.com/xEjh7g9U

I wonder why not implement a full Javascript engine to read in those configuration files, it kind of sucks to keep on typing user_pref( in every line when one could put all the configs in a list and loop over it and use user_pref() to apply them.

top 2 comments
sorted by: hot top controversial new old
[-] 0v0@sopuli.xyz 41 points 1 year ago

https://stackoverflow.com/questions/10602504/how-does-user-js-work-in-firefox-in-detail:

It just looks like a JavaScript file. Once upon a time in Netscape 3 and maybe 4 it actually was, but now it's just a file with a .js extension and a very restricted syntax that's parsed by a separate (non-JS) parser and not executed in any way.

[-] v12riceburner@lemmygrad.ml 11 points 1 year ago

Code execution increases security risk which requires more work to make sure they're doing it right. Better to ship something than nothing

this post was submitted on 28 Oct 2023
12 points (67.6% liked)

Firefox

17302 readers
94 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 4 years ago
MODERATORS