logoalt Hacker News

swyxyesterday at 10:57 PM4 repliesview on HN

is this better than using a chrome extension? i guess people need to have tampermonkey installed and so thats a slightly higher barrier to entry? i wonder if chrome would be interested in "sherlocking" userscripts so that we can distribute non security nightmare code easier.


Replies

noncovalencetoday at 12:19 AM

In addition to the advantage of explicitly specified capabilities mentioned by others, I'd say a userscript is also much more durable and low-maintenance than a Chrome extension. This is coming from someone who's written an extension for personal use before, and had to jump through a million hoops with Chrome Dev just to give the browser permission to run my own code that I wrote myself, and that's to say nothing of the whole mess with manifest v3 as well. Throughout the entire time I've been able to happily keep using userscripts written by myself or others with 0 maintenance required.

twalichiewiczyesterday at 11:18 PM

Mostly transparency. Since this runs across pages you visit (with the sites controlled by the @include/@exclude rules at the top of the script), I like that the entire source is right there and easy to inspect before installing it.

A userscript also let me iterate quickly without dealing with extension packaging and permissions, but being able to see and tweak the code was a big part of the appeal.

perpilyesterday at 11:05 PM

Tampermonkey isn't better than using a Chrome extension, but it's less friction for a developer to build and distribute a cross browser script. If they build it as an extension, they need to target multiple browsers and get it deployed to the Firefox/Chrome web store.

show 3 replies
aaron695today at 12:59 AM

[dead]