News for hackers. Stuff that matters.
Re:Browser extensions are underrated: the promise of hackabl... by idoubtit on Tuesday July 30, 2019 @02:12AM (#20562464)
The irony is that I ported two of my old user scripts to web extensions. With old Opera, userJS was native, while TamperMonky is a (big) web extension. I had performance problems with TamperMonkey, so I rewrote my scripts to avoid this layer.

Pros of TamperMonkey/userJS:

- Allows live editing (with syntax highlighting) with immediate refresh, all in the browser. This is handy for minor changes on small files, but slow for big files.

- Direct access to some HTML5 APIs that are restricted in extensions. I don't recall if that was the case with TamperMonkey, but OperaJS allowed plain AJAX and WebStorage usage, just as if the file was included in the web page.

Cons:

- Slower than extensions.

- Less powerful (cannot add a button in a browser bar, etc)

- Painful as code grows. An extension allows simple splitting of code into several files. I found UserJS harder to maintain.

- Cannot load JS _and CSS_ like an extension does. Another extension like Stylus is needed.

There are no comments on this comment yet.