News for hackers. Stuff that matters.
Re:For your next side project, make a browser extension by Alifatisk on Sunday January 15, 2023 @04:40PM (#34393792)
I try to stay away from browser extensions as much as I can, it will only bloat my browser even further. Firefox + Tampermonkey should be enough in my case.

Is there anything a browser extension can do that Tampermonkey cannot?

Re:For your next side project, make a browser extension by mmahemoff on Sunday January 15, 2023 @08:00PM (#34395488)
Tampermonkey can change what's on the web page, but extensions can do much more than that, e.g. add toolbar menus and items to the context menu, add keyboard shortcuts, manage bookmarks, and so on. (See the API guide for an overview [1])

It's true that many extensions could "just be" Tampermonkey scripts. I'd guess they ship as standalone extensions due to a combination of: less friction to install, more discoverable, can extend with fancier features later on, and probably just inertia/ignorance from developers unaware of Tampermonkey.

1. https://developer.chrome.com/docs/extensions/reference/

Re:For your next side project, make a browser extension by ge96 on Sunday January 15, 2023 @09:31PM (#34396102)
A friend of mine uses this extension that tracks emails. It injects a pixel it made remotely into the email body. That sketches me out so much ha.

But yeah I have made a few extensions myself since I spend a lot of time in Chrome. If they go ahead with the anti-adblock I will have to learn Firefox's extension.

Re:For your next side project, make a browser extension by kshay on Sunday January 15, 2023 @10:25PM (#34396448)
Right, for the average user the barrier to entry for userscripts is significantly higher than for extensions. I recently released one (a small enhancement to the Netflix UI) in both forms for this reason: https://greasyfork.org/en/scripts/446689-netflix-recommendat..., https://chrome.google.com/webstore/detail/netflix-recommenda...
Re:For your next side project, make a browser extension by AgrMohit on Monday January 16, 2023 @09:46AM (#34401132)
As for keyboard shortcuts, userscripts can do that by observing individual key presses. I personally use a tiny library [0] by the Violentmonkey team to do it which is easy to use and smooths out differences between platforms and browser implementations.

While userscripts can't add items to toolbar or context menus, you can register menu commands [1] which have the added benefit of being able to be added dynamically after examining page contents. This is done using the `GM_registerMenuCommand` api [2].

[0]: https://violentmonkey.github.io/guide/keyboard-shortcuts

[1]: https://imgur.com/a/SWpOoRS

[2]: https://violentmonkey.github.io/api/gm/#gm_registermenucomma...

Re:For your next side project, make a browser extension by weaksauce on Sunday January 15, 2023 @08:59PM (#34395918)
blocking ads amongst many other browser native features. managing history/tabs/bookmarks/adding right click options/interacting with native applications on your computer for a few
Re:For your next side project, make a browser extension by postalrat on Sunday January 15, 2023 @09:43PM (#34396197)
Why don't you consider tampermonkey scripts to be bloat?
Re:For your next side project, make a browser extension by Alifatisk on Monday January 16, 2023 @03:32AM (#34398318)
Well, I do. I try to have as few scripts as possible.
Re:For your next side project, make a browser extension by midoridensha on Sunday January 15, 2023 @11:16PM (#34396738)
>Is there anything a browser extension can do that Tampermonkey cannot?

Blocking ads, translating web pages, bypassing paywalls, adding features to websites (like the YouTube extension), clearing trackers, I could go on and on.

Re:For your next side project, make a browser extension by PurpleRamen on Monday January 16, 2023 @07:10AM (#34399818)
> Is there anything a browser extension can do that Tampermonkey cannot?

Tampermoney is an extension, so it can obviously do the same as others. But how much of this does it make accessible to the user scripts? Can you access the local file system? Other Servers? Can you modify the browser-interface itself? Context menu, toolbars, sidebar, add shortcuts, etc.? Can you save persistent data? And can you do all this at an elaborated level of quality?