Focus & Blur: Behavioral Inference & the Tattletale Browser

This web thing’s been bugging me for too long. Have you ever tried to background a tab that is playing insufferable & unskippable content, only to find out that the annoyance has paused itself until your eyeballs are known be aimed back at it? Why do browsers honor requests to let websites know if you’re paying attention or not?

This is achieved by relying on the focus and blur events. But there are many UI Elements that rely on them to trigger useful UI responses. Think of a suggestion box that shows up when you click in a search bar for example. The window element though, is one for which I cannot think of a single instance where the focus and blur events at are used to benefit the user. I think a well intended couple of events were generally implemented to every possible elements, but one of them reveals more than was intended and is abused to that effect. Why would ad-blocker not nuke them either? I’ve gone through this rabbit hole several times over the years trying to find an extension or adblocker customization to dismiss these events. Alas, they never seem to have made it into the crosshair as the true annoyance that they are. How do you like to have your browser report how good you are at consuming content as intended?

These events are responsible for more ills than making sure you’re watching, they are a key metric for inferring behavior. As with much of data mining, what’s scary isn’t really the information you’re giving away, it’s what can be inferred from it. In a way these attention events are perfectly suited for the attention age. Particularly though, they matter when they are attached to the window element. As far as I know, that is the only method I’ve seen in the wild that is abused into this purpose.

In any case, since I never could find anything, here’s what I came up with. The best way I found to run user JS on all websites is using Tampermonkey. Then here’s the script I’m running:

// ==UserScript==
// @name         Attention Event Nuker
// @namespace    http://tampermonkey.net/
// @version      2024-05-01
// @description  nukes focus and blur events when attached to the window element
// ==/UserScript==

(function() {
    var old_add_event_listener = EventTarget.prototype.addEventListener ;

    EventTarget.prototype.addEventListener = function(event_name, event_handler) {
        if( this.toString()==window.toString() &&
           (event_name=="blur" || event_name=="focus") ) {
            console.log( "attention event caught: " + event_name + " on: " + window.location.host ) ;
        } else {
            old_add_event_listener.call( this, event_name, event_handler ) ;
        }
    };
})();

Unfortunately I did run into a couple of sites that somehow rely on the events to even work properly. I don’t think I want to reverse engineer them 1 by 1 so I’m adopting a blacklist of sites which is a bit obnoxious. For a while I did have the script report which sites were asking for the events, the results weren’t surprising and showed that pretty much any big site with a baseline of behavioral data mining wants to know what your eyeballs are in front of.

Majestic Cat

I’ve gotten in touch with Lara Laubert through MandalaGaba when she reported a bug about it. Thank god for bugs, because she’s an extremely talented artist from Brazil, and has great enthusiasm for random cool projects. Inevitably when the big plotter was built, I reached out to see if she’d like to collaborate on getting her art rendered by it, and being the cool person that she is, she was willing to launch into it. I won’t link to her social media, because they’re all walled, I don’t have accounts, and I don’t want to refer to them but she is easily Googlable (something I soon won’t say either seeing as they have been taking steps away from their “don’t be evil” moto, but let’s not turn this into a state of the Internet discussion). Lara is an amazing artist greatly skilled in capturing the natural world. I would say there’s a gift in there too, but I don’t want to take away from the work she must have had to put in to develop her skills.

An so through much back and forth, Majestic Cat was born.

I don’t do much more than run some algorithms and operate the machine, but there’s still a lot of work involved. Including many trials before the public reveal: 6 days in a public place where her art to be drawn by the plotter. I did this to coincide with a public event and it was wonderful to see people’s reactions to it.

There was a slight misalignment about 2/3rd of the way in as was made evident at the return to origin. You wouldn’t really know it’s there unless you looked carefully. I believe someone must have bumped into it at some point and that’s ok, I know it’s a bit of a gamble with many people (and kids) stopping by to see it. Maybe it was an actual issue with the plotter, but I never saw this in thousands of hours of plotting.

I’ve been practicing with a laser, and so of course I lasered Majestic cat. It looks awesome.

From the many trials before the public installation, we have Majestic Cats all over the house now.

And the best part is, this is only our first checkpoint to make sure we could work with each other’s format requirements. Majestic cat is a fraction of something bigger.

It’s the Season of Mistakes

Here I was, patting myself on the back for all the experience acquired over 7 sugaring seasons. This 8th one though, I’ve made several costly mistakes. A filtering snafu, sap overflow, woodpiles allowed to get wet, and more importantly, I misread the weather and let the pan full of syrup spoil. I thought it had been cold enough but it hadn’t and I let it sit too long. I could smell it right away when I started boiling. It didn’t smell bad but it was lacking the sweetness and you could tell something was off.

So that’s it, an anticlimactic end to a very decent season otherwise. It’s not worth rebuilding up the pan with the sap about to turn. And it’s ok really, we still made enough, and I’m actually enthused to get going again next year with a list of many things I want to improve, which I’ll implement until then.

Still though it’s a bit of a shame to waste all this effort. If nothing else, it’s good exercise out in the woods, and it’ll make a nutrient dense addition to a pile of compost. It’s always good to remind myself that I used to go to a gym and exert myself into the void. Moving 200 gallons of sap from the forest to a compost pile achieved something at least, on top of being a good workout.

We received a monster snow storm that made bucket harvesting a snowshoe ordeal. Esther loved creating little paths between the buckets.