News for hackers. Stuff that matters.
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 :)
Re:Show HN: HN Avatars in 357 bytes by benatkin on Monday March 14, 2022 @02:39AM (#30669170)
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...

Re:Show HN: HN Avatars in 357 bytes by daptaq on Monday March 14, 2022 @06:28AM (#30670649)
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.
Re:Show HN: HN Avatars in 357 bytes by mrmuagi on Monday March 14, 2022 @07:14PM (#30679785)
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.
Re:Show HN: HN Avatars in 357 bytes by throwamon on Monday March 14, 2022 @03:02AM (#30669276)
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.
Re:Show HN: HN Avatars in 357 bytes by j-james on Monday March 14, 2022 @03:56AM (#30669587)
They're probably confusing it with Tampermonkey, which isn't open source.
Re:Show HN: HN Avatars in 357 bytes by floucky on Monday March 14, 2022 @05:28AM (#30670208)
You can quickly create a Chrome extension to excecute js or css on any website: https://developer.chrome.com/docs/extensions/mv3/content_scr...
Re:Show HN: HN Avatars in 357 bytes by freeCandy on Monday March 14, 2022 @02:32AM (#30669136)
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.
Re:Show HN: HN Avatars in 357 bytes by wizwit999 on Monday March 14, 2022 @07:09AM (#30670927)
needed to add.

  let c,x,X,Y,r,i,s;
Re:Show HN: HN Avatars in 357 bytes by smartsl on Tuesday March 15, 2022 @10:44PM (#30694734)
and let u;
Re:Show HN: HN Avatars in 357 bytes by sgt on Monday March 14, 2022 @03:26AM (#30669394)
Or ask pg to save it on the server side.