Userscript is a really good tool to tamper with the web.
What can you do with Userscript?
Nearly anything you can accomplish using DevTools can be achieved through userscripts. It would improve your browsing experience.
- Redirect to Old Reddit
- Get YouTube Subtitles:
document.querySelector("#movie_player")?.getPlayerResponse()?.captions?.playerCaptionsTracklistRenderer?.captionTracks - Add websites shortcuts, for example, "jkl", "<>" to videos for forward/backword, speed up
Doing console.log in the script will also log in the browser console, so it's easy to debug.
Userscripts vs Extensions
You can write anything, publish it anywhere, and use it across browsers (with extensions such as Tampermonkey, Violentmonkey, Greasemonkey, etc) with userscript. Userscript is like running code in the web console. But to publish an extension you need an icon and manifest, and very specific pixeled images, and other things such as why you would need this and that permission. Besides, you need to inject the script in Extensions instead of using it directly on the page.
Though, extensions have a much wider reach and you can present it in a much more user friendly way. Publishing an extension would be an exercise in presentation, there is some gap between most people's usage habits and the tech specifics. Most users won't edit JavaScript, but they will click buttons and toggle settings. If you want to share your tool beyond technical users, packaging it as an extension with a GUI is the better choice. Publishing an extension with a (even basic) GUI is a better way to bridge that gap.
Mobile
Chrome on Android doesn't support extensions.
These browsers support extensions:
- Microsoft Edge (Doesn't support most extensions, need workaround in Canary version, support TamperMonkey and a few "approved" ones)
- Yandex Browser (bans Tampermonkey and Ublock Origin, it works on a whitelist. Ublock Origin dev and ViolentMonkey works)
- Firefox (Firefox removed Ublock Origin Lite from its add-on store)
- Kiwi Browser(Discontinued, some websites may break, for example, YouTube and ChatGPT)