←back to thread

1901 points l2silver | 2 comments | | HN request time: 1.692s | source

Maybe you've created your own AR program for wearables that shows the definition of a word when you highlight it IRL, or you've built a personal calendar app for your family to display on a monitor in the kitchen. Whatever it is, I'd love to hear it.
Show context
dang ◴[] No.35737646[source]
Definitely my HN moderation browser extension, which lets me flip through HN super fast and do routine mod tasks without gruntwork.

If I live long enough, I will factor out a general-reader version of this that will bring joy to HN power users everywhere.

It requires a keyboard, though. Do the kids still use those?

replies(6): >>35737666 #>>35737682 #>>35737722 #>>35737808 #>>35738165 #>>35745718 #
chrismorgan ◴[] No.35738165[source]
Ah, browser extensions and user scripts are so great for improving websites.

Most of my current user scripts:

• Hold z to make a currently-playing audio or video go at 4× (the fastest you can go before Firefox cuts off the audio).

• Auto-admit in Google Meet (wish they’d implement this themselves). There were a couple of browser extensions to do that, but I looked at their source and was appalled at how badly and/or stupidly they implemented it, and so wrote this, which is better (… so long as you use English—one of them supported I think it was Japanese as well) and more efficient: new MutationObserver(() => { document.querySelector("[aria-modal='true'][aria-label*='join'] [data-mdc-dialog-action='accept']")?.click(); }).observe(document.body, { childList: true, subtree: true });

• Retitle a few web apps that have consistently useless document titles, by pulling in actual document contents. I gave this to my sister, who regularly has hundreds of VicFlora tabs open, which used to be all titled “VicFlora”; last year they fixed that but got the endianness wrong, “VicFlora – ‹Page title›”, so I fixed that to “‹Page title› – VicFlora” so you can actually see the useful part in the tab bar. (Document titles should be little-endian.)

• Find <video autoplay> and turn on controls (since I have autoplay blocked—incidentally, this is something disabling autoplay should probably automatically do, at least until you start the video).

• Kill aos-* animations on pages, which stupidly tend to make the page invisible until their JavaScript loads. (This is important for me because I disable JavaScript, but those “fade in when the page loads or as you scroll” animations are really annoying even when they work, killing them makes things better.)

• Fix Cloudflare “[email protected]” stupidity without having to run the page’s arbitrary JavaScript. (Basically: take their deobfuscator script and just run it myself if it gets used. Only people that deliberately block JavaScript are likely to have seen this, but it’s quite common. The filter they use is evidently very dumb, obfuscating quite a few things that are not email addresses, including things like “package-name@1.2.3” (not even valid—IP address hosts have to be in square brackets, and DNS doesn’t use numeric TLDs) and “user@host” in console logs.)

• Put the current weather into the favicon on weather.bom.gov.au (… except that they this shut down last month for no obvious reason, with no equivalent replacement unless you run Google Android 6+ or iOS, which I don’t on any device, let alone my laptop; so I’m stuck with just their old site which completely lacks a lot of the information this other thing had exposed, and is served over HTTP only but their server accepts HTTPS connections in order to 307 redirect to a different path on http: scheme as well in order to say “we don’t support HTTPS”, which interacts horribly with “HTTPS Only” mode (because even when you add an exception for the duration of the session, you lose the path part of the URL), and is the only site I’ve ever encountered doing such a stupid thing, and in all this they have never responded to my enquiries like they claim they will).

replies(1): >>35753305 #
1. KomoD ◴[] No.35753305[source]
> • Fix Cloudflare “[email protected]” stupidity without having to run the page’s arbitrary JavaScript. (Basically: take their deobfuscator script and just run it myself if it gets used. Only people that deliberately block JavaScript are likely to have seen this, but it’s quite common. The filter they use is evidently very dumb, obfuscating quite a few things that are not email addresses, including things like “package-name@1.2.3” (not even valid—IP address hosts have to be in square brackets, and DNS doesn’t use numeric TLDs) and “user@host” in console logs.)

> • Hold z to make a currently-playing audio or video go at 4× (the fastest you can go before Firefox cuts off the audio).

Are these open-source by any chance?

replies(1): >>35772714 #
2. chrismorgan ◴[] No.35772714[source]
I haven’t got round to publishing them properly (z = fast-forward in particular I have in mind to write a blog post about, on how to write user scripts for things you want), but the fast-forward one is at https://temp.chrismorgan.info/z%20=%20%E2%8F%A9.user.js. For the Cloudflare one, I won’t list its full source, but it’s this:

  if (document.querySelector("script[src$='/cloudflare-static/email-decode.min.js']")) {
      {The source of that JavaScript file, minus the “remove the email-decode.min.js script tag” thing.}
  }