Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's already an add-on which does this, and more. https://addons.mozilla.org/en-CA/firefox/addon/clearurls/


I actually prefer short userscripts like this over addons, because I can immediately see it's not doing anything nefarious and I only need to trust the addon that I install the user script with.


> I only need to trust the addon that I install the user script with

I wonder why this is even necessary. User scripting should be a standard feature of browsers. We should have direct access to a complete Javascript environment every time we launch a browser. Just like Emacs gives users a Lisp environment.


It is, sort of, in Firefox. It's just janky and unfriendly and underdocumented.

But you can have user styles, user chrome (styling of the FF frame itself), and user scripts per profile, as files wherever all your profile stuff is stored, e.g. $XDG_CONFIG_HOME/mozilla/firefox/profiles/blah.


For now. userChrome.css is already disabled by default, requiring you to enable toolkit.legacyUserProfileCustomizations.stylesheets first.


You do, it's just in the devtools menu. The missing piece is triggering javascript based on the loaded page.


Browser devtools are amazing and do have a Javascript REPL. Do people use it for scripting though? It's always been more of a debugger than a Javascript environment. People install node.js for local scripting even though it's the same Javascript engine.

It's also not available on mobile.


It’s great if you’re on an unfamiliar machine and need a calculator with loops. It’s also great to press all the buttons on a website.


it was, in Opera up to 12.xx. You just dropped .js files in designated directory and it _always_ ran before executing website js.


Same here.


I recently noticed addons.mozilla.org also tracks links using this method. If you scroll down to "Add-on Links" the links to "Homepage" and "Support site" go to

  https://outgoing.prod.mozaws.net/v1/8a4c4de845953bc85d10c6465c5c0f11210b5ca1c195b70d7ddfcf8b74592477/https%3A//clearurls.xyz/
and

  https://outgoing.prod.mozaws.net/v1/8a4c4de845953bc85d10c6465c5c0f11210b5ca1c195b70d7ddfcf8b74592477/https%3A//wiki.clearurls.xyz/
respectively, instead of going to the page directly.

Why Mozilla? Why are you tracking us ? Of all the pages...


This is the "privacy friendly" company that adds google analytics to their sites while enrolling users in experiments and collecting telemetry without informed consents. Why are you surprised?


Sadly it seems to be unmaintained, or at least under maintained. I was going to open am issue for missing Firefox mobile support but issues seem to be going un answered




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: