Hacker News new | ask | show | jobs
by vbezhenar 1856 days ago
I don't think so. Injecting JS is a valid use-case and will work forever, probably a huge majority of extensions do that. An intention is to make content blocking extensions more performant.

It's very easy to inject JS. I don't know whether you're talking from your own experience, but I wrote my little extension to replace uBlock (with my own list of rules and blocks) and to inject JS or CSS you just have to add a line in manifest.json which have nothing to do with blocking API.

1 comments

See here where Justin Schuh says the sole motivation is for privacy reasons: https://twitter.com/justinschuh/status/1134092257190064128

I know it is easy to inject JS and that you can do it with the manifest file. But without the old content blocking API you can't dynamically inject different snippets on different pages based on filter lists for example (unless you inject something on every page).

I wouldn't be surprised if in the future, content blocking extensions won't be allowed in the store if they use such broad permissions for example.