Curated list of userscripts
github.com
github.com
Some of my fondest memories is weekends spent chatting with friends and strangers on IRC, and improving my script or reading someone else's code in the downtime, and downloading mp3 in the background.
To be honest, I don't think there is any point to include specific scripts to begin with. https://greasyfork.org/ probably is a better place to find them.
Just list all the "meta" sites (toolings, host sites, articles) about userscript is probably better and easier.
On a side node, if anyone has resource about how to dev/debug userscript properly, I'm all ears. I found it super inconvenient and tedious when doing it myself, and I often have to manually copy paste stuff back and forth.
Agreed. Even stranger is that some errors end up in the console but others do not. Syntax errors particularly seem to fail silently.
If I'm putting together something that I know will be more than a dozen lines or so (or is targeting a page sitting behind logins and extra navigation) I will just save the target page as a local file and write the JS into that file and debug as normal until it's working, then copy the JS over to a userscript.
// ==UserScript==
// @name HN test
// @version 1
// @grant none
// @include https://news.ycombinator.com/\\*
// ==/UserScript==
alert("hello"
shows nothing in a userscript, but:
Uncaught SyntaxError: missing ) after argument list test.htm:23
in a local page
Develop it as an extension with the script as your content_script, and use web-ext [1] to run it. You can then develop in your regular editor, use your browser's extension debugging tools, and web-ext will automatically reload it when you change stuff.
Most of my extensions use a .user.js file as their content_script, which I can also publish directly to Greasy Fork.
See eg. this config.
https://github.com/Ginden/userscripts/tree/master/hacker-new...
Then I do `npm run build && cat dist/index.ts | xclip` and replace code.
But sometimes the tiniest tweaks are the best. Things like removing the points from HN so that it doesn't consume attention. Change "new" into "new threads" to make the link bigger. Hide logout. etc Perhaps one should release such one line scripts but I never did or see anyone do it.
I haven't updated it in 100 years but this was a fun concept.
http://go-here.nl/gm/wikipedia-clean-up.php
bit of php, bunch of check boxes, out comes a site specific userscript (in this case wp) that hides all menu entries you don't want on a website.
One could offer it to the website audience. Lots of links need to be where they are but are never useful. If I for example need those in the HN footer (except from guidelines and list) I'm sure I can find them when the need arises.
[1] https://github.com/darekkay/config-files/tree/master/userscr...
Same with me. Some of my userscripts are very personal and you don't need to be compelled to share one just because you put a lot of time and effort into it.
a) the site is slow - so it's better to disable all js from the site and make couple lines of code to fix basic functionality
b) the site has some kind of BS behaviour that's not adblock related but still annoying - like super simple media players that are even worse than native browser ones (tiktok is a nice example)
c) new site that has removed old features
Take Twitter for example. The elements don't exist until the page loads, and none of the classes have any useful meaning, which makes user styles impossible, and user scripts need to rely on a DOM observer or a timer to find attributes or (even more often) element text to locate some elements to hide or modify.
But there're also lots of news sites that aren't react or vue and they don't get any usercripts. Also I wonder if react and vue can be dealt with somehow so that I don't have to use special sites with custom frontend
We worked on replacing the authentication layer on a set of APIs at some point, and the project got paused cause an entire group of amazonians was using a (non declared) user script and lost functionality when we started rolling out.
Also, if you're a heavy vim user, and if you use tridactyl for Firefox, for some of the easier user script (e.g. simple redirects), you can use tridactyl, which might be cleaner. It's not as clean for larger scripts but it can work too.
Personally, I still prefer the user style over Github's solution. I find the official black theme has too much contrast (it was probably made for amoled), and the bluish-black variant looks ugly to me. The user style has very good greys, and as a bonus, I've fallen in love with the cross-hatch pattern background it provides.
> User scripts can improve your browsing experience, and open a lot of possibilities to make the sites you visit better by adding features, making them easier to use, or taking out the annoying bits.
These are like browser extensions. They don't run on a backend server, they run in your browser on certain pages, and can manipulate the contents of those pages.
Would you please change the URL, @dang?