Re:Show HN: HN Avatars in 357 bytes
by SCUSKU on Monday March 14, 2022 @02:05AM
(#30668996)
Wow this is really great! Noob question, but let's say I wanted to permanently load this JS in my browser? How would I achieve that? Grease monkey? Extension? Thanks :)
[ Parent
| on HN ]
There's a Wikipedia page greasemonkey-like things: https://en.wikipedia.org/wiki/Userscript_manager
Might try this one: https://chrome.google.com/webstore/detail/violentmonkey/jinj... I just installed it and it seems to work well.
Re:Show HN: HN Avatars in 357 bytes
by achairapart on Monday March 14, 2022 @05:22AM
(#30670161)
Why not create your own web extension? It will take just a few lines of code, you can look at this example for reference[0] (also on Github[1]).
[0]: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
[1]: https://github.com/mdn/webextensions-examples/tree/master/bo...
I don't know about you, but I really don't want an extension for every small change one might want to apply to one specific site.
That's fair how about Tampermonkey -- I use it occasionally to apply js/css/html fixups to sites, e.g. Add browser titles to sites for better bookmarks, re-organize/add site html, etc. I did use it for removing content but ublock origin is much better imo for most cases.
Violentmonkey is a nice open source alternative to Greasemonkey.
Re:Show HN: HN Avatars in 357 bytes
by chrismorgan on Monday March 14, 2022 @03:36AM
(#30669460)
Your wording implies Greasemonkey is not open source. I don’t know if that was your intention or not, but Greasemonkey is open source.
They're probably confusing it with Tampermonkey, which isn't open source.
You can quickly create a Chrome extension to excecute js or css on any website: https://developer.chrome.com/docs/extensions/mv3/content_scr...
Should be really easy with grease monkey. I simply pasted the snippet into a new script and enabled it for this site. Works perfectly out of the box.
needed to add.
let c,x,X,Y,r,i,s;and
let u;