18 comments

[ 2.7 ms ] story [ 51.4 ms ] thread
It's strange that addons have so much unsandboxed power. I think browser manufacturers are not very keen on letting users customize their browsing experience. Otherwise they would give them finer control over what addons can do.

Fortunately, most customizations can be done via bookmarklets.

Benefits of bookmarklets:

- Easy to edit

- Inactive until clicked

- Work in all browsers

- Work on mobile

- Integrate nicely into the UI. You can move them around, put them into any bookmark folder, assign shortcuts.

I wrote this bookmarlet editor which makes it easy to convert between clean code and a bookmarklet:

https://www.gibney.org/bookmarklet_editor

Here is one that I use to read HN:

    if (!location.href.match('ycom'))
        location.href='https://news.ycombinator.com';

    doTheMagic = function() {
        if (typeof e!=='undefined')
            e.style.background='#c0c0c0';

        e=Array.from(document.querySelectorAll('.age a:not(.seen)')).sort().at(-1);e.style.background='#ff0';
        e.classList.add('seen');
        e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"});
    }

    doTheMagic();

    if (typeof theMagicIsActive=='undefined') {
        document.addEventListener("keydown", function(evnt) {
            if (evnt.key === "n") doTheMagic();
        });
        theMagicIsActive = true;
    }
When clicked and HN is not already opened, it opens HN. When on HN, it jumps to the next newest story. Or comment - it also works in the threads. After jumping to the newest story, clicking it again jumps to the next newest story. Instead of clicking it, pressing "n" also works.

Also works in the comments view of a profile. So when you want to see if someone replied to your comments, you click on "comments" in your profile and then on the bookmarklet to jump to the newest reply.

> It's strange that addons have so much unsandboxed power.

That's because addons are a relic from the wild west era of the 1990s, where the philosophy was to give the user a chainsaw and if they chop their own leg off that's their problem.

That's in contrast to the modern software design philosophy, which is that the average user is so drunk they're almost falling over, and the world should contain no chainsaws whatsoever in order to accommodate this.

Browser designers would love to remove add-ons, but no browser can succeed without an ad blocker, and providing an extension mechanism provides this, without requiring the browser maker to get into the ad blocking game personally.

I recognize that I may be contributing to your "addons have so much power" argument, but I wanted to draw your attention to ViolentMonkey <https://github.com/violentmonkey/violentmonkey#readme> which is stellar for these site-specific customizations (known as User Scripts, of which Greasemonkey was the most famous)
Most extensions I see could be userscripts. Benefits include: it's easy to see the code you're about to install + if you get them from GreasyFork there's some good protections against obfuscated or external code.

https://greasyfork.org/en/help/code-rules

https://greasyfork.org/en/help/external-scripts

It would be great if there was a way to set them to not execute until clicked, but at least it's easy to see the list of scripts that are set to run on the current page and toggle them on and off.

(comment deleted)
I noticed about myself that in recent years I am becoming increasingly paranoid when it comes to addons and avoid installing any but the most popular/trusted, not just for Firefox, but all applications I use. If there is an addon that does something I want and doesn't fit my criteria for trust, I either write my own private clone, adjust my habits not not need it or (the most frequent outcome) just suck it up.
That’s a good approach, especially since everyone (Atlassian, Zoom, Salesforce, etc.) seems to be rebranding addons as “app stores” where the initially free stuff becomes paid. It’s better to avoid as many dependencies as possible in your workflow so you’re not stuck when this happens.
I like the idea of this and I'll probably use it. But what I really want to know is when my extensions are updated. Some extensions will open an information page when this happens, but I want a browser setting to let me know when any extension updates.

I know there is a setting to not auto-update on an case-by-case basis, as browsers auto-update extensions by default as a security measure. In that case, an alert that there are updates would be welcome.

Any solution to this, or am I missing a setting somewhere? (On Firefox or Chrome)

On the Chrome extension, the top HN comment was pointing out that it doesn't show change in owners, but change in the owner's key, which makes it susceptible to false positives and false negatives. Does the Firefox version work any more reliably?
It's possible(?) that mozilla automatically generates a similar key for addon devs, but I definitely was not required to upload one when I first published this.

Honestly, I'm not sure what difference this makes. If someone really wants to hide their sale of an extension, they can absolutely include the usage of their dev account to the buyer, rather than making use of mozilla's system for transferring ownership.

If you're curious, here's the relevant section of code. I'm totally open to reworking it if you have alternative suggestions:

https://github.com/maxtheaxe/under-new-management-firefox/bl...

I'm hitting the AMO API directly, so you can see an example response of all the data I'm working with here:

https://addons.mozilla.org/api/v5/addons/addon/under-new-man...

I now disabled for all extensions the automatic updates. All extensions are working as expected so I will only update one of them in case of problems. In which case I also (mental note) will check the ownership.

Can an extension see what other extensions are installed and their versions? Can your extension maybe show when one of them is updated? Can also be a way to keep 'manually' an eye on changes?