Comment on I wrote hacky tampermonkey script to fix Lemmy instance links. Any advice?
cynber@lemmy.ca 1 year agoSounds good! This was my first dive into browser extensions as well. It’s not too bad once you go over the basics. If you give it a try, see the contributing page on the repo’s wiki for some resources on how to get started with browser extensions.
A super short summary is:
- manifest.json is the entry point, it links to HTML files (which represent things like the popup, sidebar) and scripts (which do most of the work)
- the background script runs all the time (see background.js), and the content scripts run on specific pages (ex. There’s one for Lemmy community pages, one for error pages)
If you DO give it a try, we were part way through migrating features from the LemmyTools userscript and that might be a good place to start. I wasn’t familiar with userscripts so I didn’t make much progress, and can’t get back to it for a little while. The issues page of the repo should have LemmyTools related features tagged. If any details are missing, let me know and I’ll add them in :)