the Worthless Writeup Library @ szy.lol

My browser setup (ancient Chrome)

work started on 2021-01

I run an ancient Chrome version, just because it’s funny.


Well, the most direct form of “funny” is that (patched) Flash Player still works. I run the last version that supports PPAPI, Chromium 87. More precisely, it’s a Manjaro repo build of 87.0.4280.141.

Screenshot of chrome://version

I have a lot of flags set. Mostly to enable features which were only in testing in that version, such as the QR code generator, but also to disable ones I for arbitrary reasons don’t like, like AVIF or QUIC. I have also disabled software compositing, because my setup is very unstable (I blame Nvidia) and the GPU process crashes a lot, resulting in the browser becoming too slow near immediately.

The main issue with running an old version, is that the webdev industry loves to Move Fast And Break Things™, resulting in my barely four years old browser version missing a fair bit of APIs. Thankfully, I know how to use userscripts.

A screenshot of Tampermonkey with a “polyfills” userscript

I have a script called “polyfills”, which I routinely update to patch around sites slowly using newer and newer functions that my setup doesn’t support. It started out with a copy-paste of a polyfill.io result with a bunch of stuff checked, then grew a definition of Object.hasOwn, a very pleasantly golfed crypto.randomUUID implementation I yanked off Stack Overflow, and most recently a copy of the structured-clone library because FB Messenger started requiring structuredClone and my earlier JSON cloning hack wasn’t enough for them.

I run a lot of userscripts in general. Most are one-off hacks, like a script adding video controls to the videos embedded on prawko.pl (a website for driving theory tests that was included in my course) or implementing “mark all as unread” on my school’s grades portal’s messaging system, or even just calling setTimeout(()=>location.reload(), 2000); on a website I was throwing together, as a hacky live reloader. As far as more generic userscripts go, I recommend Image Max URL for easier copyright violations, Disable Shorts to redirect YouTube Shorts to a normal video page, YouTube Age Restriction Bypass because I don’t have a Google account, Bring Back Old Reddit for usable search results. I also recently repackaged a script for forcing mono audio on YouTube videos, posted near the end.

Similarly to userscripts, I also heavily use custom CSS. These are mostly very custom tweaks and patches around the browser not supporting the newest CSS features (like aspect-ratio), but I will share here how to uncirclify Twitter.

In addition to Tampermonkey for userscripts and Stylus, I use a lot more extensions. The most important ones are [uBlock Origin][uo] for ad blocking, and the incredible extension Consent-O-Matic for bypassing consent popups, both of which I install on everyone’s browsers. I keep uBlock in hard mode by default, and have gotten used to having to mess with it to get a site to load; I do not set that as a default in everyone’s browsers. To be able to stay alive with my habit of having a billion tabs open (at the time of writing, 152 tabs in 14 windows) I use The Marvellous Suspender and Session Buddy. I also sporadically use Image Search Options for image searching, GoFullPage for large screenshots, and rikaikun as a Japanese dictionary. I also have SponsorBlock.

I used to be logged in to Chrome, but I kinda don’t have access to that account anymore (long story), and the connection broke, forever adorning all my windows with a Paused in the upper right corner. Yes, I should be using ungoogled, no I can’t be bothered.

I don’t use a Chrome theme, it’s currently using the system theme (“GTK+”). I use DuckDuckGo as a search engine, and adorn most of my searches with !g.

I also have a similarly ancient Firefox installed, I use it for a few sites that don’t like my Chromium anymore, and for a few extensions that don’t run on it. It’s also set to disable external fonts, so I can enjoy the Web in glorious bitmapped Tahoma (+ MS Gothic for monospace). If I really really need a modern browser, Tor Browser updates itself independently and I have used it in a pinch.

Where do I go from here? One day my set of band-aids will not be enough, and I will probably migrate to a newer Ungoogled version, or to Firefox, or maybe Ladybird will be daily-driveable by then. Or maybe I will be legally required to use Manifest V5 Chrome on Windows by the DRM in my glasses’ advertisement insertion middleware, who knows.


Addendum - random scripts

Remove circles from Twitter

.r-sdzlij, img.actioned-user-profile-img, .Tweet-avatar{
border-radius: 5px;
}

Mono audio for YT

Based on this gist. Started from context menu!

// ==UserScript==
// @name         Force mono audio
// @namespace    http://tampermonkey.net/
// @version      2024-08-12
// @description  try to take over the world!
// @author       You
// @match        https://www.youtube.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant        none
// @run-at       context-menu
// ==/UserScript==

(function() {
    'use strict';
	var context = new AudioContext()
	var audioElement = context.createMediaElementSource(document.querySelector("video"))
	context.destination.channelCount = 1
	audioElement.connect(context.destination)
})();

Dark mode for mbasic Facebook

I’m forced to use the Zuck Zone sometimes, I do that through mbasic.facebook.com (the ancient phone interface). Here’s a script to make it slightly nicer.

html {
    filter: invert(1) hue-rotate(180deg);
}
img {
    filter: invert(1) hue-rotate(180deg);
}
span[style*="emoji.php"] {
    filter: invert(1) hue-rotate(180deg);
}
body, tr, input, textarea, button {
    font-family: "MS PGothic"!important;
}

Really, this is a generic dark-mode-ification script for anything.

F1 event catcher

Pressing F1 causes Chrome to pop up its help page. Catching that within a website causes that not to happen.

// ==UserScript==
// @name         F1 help disable
// @version      0.1
// @description  fuck chrome
// @author       fuck chrome gang
// @match        *://*/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    document.addEventListener('keydown', function(ev) {
        if (ev.code == 'F1')
            ev.preventDefault();
    });
})();

Keybinds for teoria.pl

Komuś może się przyda.

// ==UserScript==
// @name         teoria.pl keybindy
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  ABC->qwe, TN->as, next->enter, lshift->play, practice-next->space,backslash
// @author       You
// @match        https://www.teoria.pl/*
// @icon         https://www.google.com/s2/favicons?domain=teoria.pl
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let PD = false;
    function meow(q) {
        let e = document.querySelector(q);
        //console.log(e);
        e.click();
        PD = true;
    }
    document.addEventListener("keydown", function(e) {
        console.log(e.code);
        PD = false;
        if (e.code == 'KeyQ') meow("#a-button");
        if (e.code == 'KeyW') meow("#b-button");
        if (e.code == 'KeyE') meow("#c-button");
        if (e.code == 'KeyA') meow("#yes-button");
        if (e.code == 'KeyS') meow("#no-button");
        if (e.code == 'Backslash') meow("#learning-next-question");
        if (e.code == 'Space') meow("#check-question-button");
        if (e.code == 'Enter') meow("#next-question-btn");
        if (e.code == 'ShiftLeft') meow('#playpause');

        if (PD) e.preventDefault();
    });
})();

Mini Flagger

(added 2024-10-25)

After Wordle got bought out by the New York Times, me and friends ended up adding the NYT games to our daily routine too. Most games have easily shareable click-to-copy summaries we can post (copying Wordle), but the Mini is an image. As such, we just select the You solved The Mini⮒in 45 seconds. and post that. However, there are two minis available each day - the current and random old one. These are not distinguished in the text, so after manually adding (Old) I ended up automating it.

// ==UserScript==
// @name         Mini Flagger
// @namespace    http://tampermonkey.net/
// @version      2024-09-04
// @description  Mark The Mini as The Mini (old) when The Mini is Old
// @author       Me
// @match        https://www.nytimes.com/crosswords/game/mini
// @match        https://www.nytimes.com/crosswords/game/mini/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=nytimes.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    if (/game\/mini$/.test(location.href))
        return;
    setInterval(function() {
        let el = document.querySelector(".mini__congrats-modal--message .xwd__bold");
        if (el && el.innerText == "The Mini") {
            el.innerText += " (old)";
        }
    }, 500);
})();