Live data from Hacker News

Userscripts Are Fun and Are Still Very Much Relevant

dutzi.party

41–50 of 145 posts

Re: Userscripts Are Fun and Are Still Very Much Relevant

#41
Yeah, as a developer I still use userscripts and also create them sometimes. Just some days ago I updated my Wikipedia Flag Icons e I recently created a super simple one to sort Linkedin feed chronologically by default. Both are open source and available as extensions too:

- https://github.com/DavideViolante/Wikipedia-Flag-Icons

- https://github.com/DavideViolante/Linkedin-Feed-Sort-By-Rece...

Re: Userscripts Are Fun and Are Still Very Much Relevant

#42
post #39

15 years ago i used userscripts for ... kinda cheating at a popular browser game. i didn't do anything _really_ illegal, it just extended the UI. e.g. if you sent an army to rob a village, it stored the type and level of workshops and calculated how many troops you'd have to send plundering the next time. it worked really well. next i changed the backend from local storage to a shared database and shared the script w…

In a similar vein: https://code.tutsplus.com/tutorials/how-to-build-a-python-bo...

Re: Userscripts Are Fun and Are Still Very Much Relevant

#43
post #2

Tampermonkey, ViolentMonkey and GreaseMonkey are all available in Firefox. Can anyone provide a comparison? Edit for the early commenters: as I stated, all of the above are available on current Firefox. Greasemonkey also has been ported to webextensions. Hence my question. Edit 2: TamperMonkey is closed source source and apparently embeds Google Analytics. Either of those immediately kill it for me, considering the k…

I've stuck with Greasemonkey myself too. My reason is a bit more esoteric -- I use a user script which adds a dicebear.io/adorable.io avatars based on usernames on HN (I find it easier to remember commenters by the avatar/username combo rather than just username), and Greasemonkey seems to have been the only one out of the three to successfully bypass HN's CSP rules and show the actual hotlinked images.

Re: Userscripts Are Fun and Are Still Very Much Relevant

#44
post #25
post #23

I recently wrote a tiny alternative to the mentioned webpack plugin https://github.com/nfour/TinyWebpackUserscriptPlugin Using it in this project with some userscripts (see webpack.config.ts): https://github.com/nfour/userscripts Tampermonkey seems like the best script manager for developer experience (as far as I could tell from trying the others) when configured as recommended (removing cache checks etc.), though i…

web-ext does hot swap, see the sibling comment from insin to get a minimal manifest for a userscript.

Nice, looks valuable

Re: Userscripts Are Fun and Are Still Very Much Relevant

#45

Earlier quoted context omitted.

GreaseMonkey is the "legacy" option. ViolentMonkey runs on Chrome. TamperMonkey runs on Firefox.

Both you and the article recommend not to run ViolentMonkey on Firefox. Why?

I think it's stale info -- ViolentMonkey used to be unavailable on Firefox.

Re: Userscripts Are Fun and Are Still Very Much Relevant

#46
post #6
post #2

Tampermonkey, ViolentMonkey and GreaseMonkey are all available in Firefox. Can anyone provide a comparison? Edit for the early commenters: as I stated, all of the above are available on current Firefox. Greasemonkey also has been ported to webextensions. Hence my question. Edit 2: TamperMonkey is closed source source and apparently embeds Google Analytics. Either of those immediately kill it for me, considering the k…

Here's a short relevant Reddit thread: https://www.reddit.com/r/firefox/comments/9uemks/greasemonke... Though I wrote Greasemonkey originally, I have no idea regarding the answer to this question. What I can say is that Anthony Lieuallen is a super standup guy, which is why I handed it over to him and Johan way back. Based on that alone, I personally continue to use GM whenever I have a need.

Thanks! GreaseMonkey was so crucial back during my Ingress days!

Re: Userscripts Are Fun and Are Still Very Much Relevant

#47
post #39

15 years ago i used userscripts for ... kinda cheating at a popular browser game. i didn't do anything _really_ illegal, it just extended the UI. e.g. if you sent an army to rob a village, it stored the type and level of workshops and calculated how many troops you'd have to send plundering the next time. it worked really well. next i changed the backend from local storage to a shared database and shared the script w…

Sounds like tribal wars or travian ;)

Re: Userscripts Are Fun and Are Still Very Much Relevant

#49
Are userscripts still run once after page load? That was a major pain point last time I tried using them, on a dynamic page. I tried hooking some events and run-registered-function-on-tree-change-but-at-most-at-N-msec-intervals, but it got out of hand and ended up looking to take much more time to write than the handler it was going to call, so I filed it under "should be written once and properly" and postponed the whole thing.

Re: Userscripts Are Fun and Are Still Very Much Relevant

#50
Funnily enough, one of my first GreaseMonkey scripts that I wrote 9 years ago was one that added the ability to collapse threads here on HackerNews [0]; this functionality was finally added in the past year or so to HN (not based on my implementation).

Worked like a charm back in the days :)

Another more popular GreaseMonkey script of mine was the Wikipedia TeX Source Extractor [1]; I used it extensively during my studies when writing lecture summaries, papers, or my thesis.

Userscripts are definitely fun and can be quite useful.

[0] https://github.com/giu/hacker-news-threadify

[1] https://github.com/giu/wikipedia-tex-source-extractor

Update: After not having touched the code of [1] for over 8 years, I just updated the userscript to work with Firefox 75.0 and the GreaseMoneky add-on v4.9.

Post reply on HN