A userscript also let me iterate quickly without dealing with extension packaging and permissions, but being able to see and tweak the code was a big part of the appeal.
Apart from that, there are APIs exclusive to extensions, e.g. instrumenting client-side communication among tabs with different origins, listing all tabs, basically accessing a special API that sits on a higher-level context, and, while gating certain functionality behind user approval, and forbidding other functionality completely (at least in Manifest 3.0), extensions with the corresponding permissions can do more than a script running in the page context. They can inject these as well, though, even overriding CSP sometimes, as far as I know?
The main problem with these permissions, and WebExtension 3.0 partly was an attempt to improve this, or at least claims it: most people give a second of doubt at best when installing an extension, as long as they think it comes from a trusted source.
thought I realize "if it works it works", https://github.com/Tampermonkey/tampermonkey
https://greasyfork.s3.us-east-2.amazonaws.com/sokzpb2ztmatlh... (screenshot)
https://greasyfork.org/en/scripts/588721-hacker-news-comment...
I'd improve it by counting top level comments next to items but that would slow it down. Still need to make some slight changes like closing sidebar by re-clicking orange (beyond just right-clicking sidebar.)
It's very fast and speeds up thinking overall.
zip is available only if you're logged-in on GitHub site
Haven’t seen that before.I would say only go for extensions over userscript if you need a settings menu (or any of the APIs the sibling comment mentions).