Sometimes, you want to stop scripts running only on specific domains. The best way to do that, I think, is with uBlock Origin - a free and fast ad-blocker. On the desktop version, it's simple to block scripts. Click the plugin icon, then click the disable scripts button. But on mobile it's a little more complicated. Here's how to do it on the Android version of Firefox. Install Firefox. Then open it and install the uBlock Origin extension for Android. In Firefox, press the ⋮ button and p…
Continue reading →
There's a law in the USA called the DMCA - Digital Millennium Copyright Act. Amongst its myriad provisions is the ability for copyright holders to send takedown notices to service providers. If someone has ripped off your content, you can send them a legal letter saying "take that down". People often send DMCA requests to Google saying "this site has stolen my copyrighted content - please remove that page from Google." Google, to their credit, let me know that they'd recently received a…
Continue reading →
I'm big enough to admit when I make a mistake. A few days ago I had a bit of a rant on Mastodon about how PayPal was encouraging browsers to remember 2FA codes. I'd tried to log in to PayPal, went to enter my 2FA code and was presented with this: But, this isn't PayPal's fault! Let's take a look at the code behind each input: <input name="otpCode-0" id="ci-otpCode-0" aria-invalid="false" placeholder=" " aria-label="1-6" role="textbox" …
Continue reading →
I'm an idiot. I ran a new version of Firefox nightly without creating a new profile. When I went to run my regular Firfox, I got this error message: Here's how I fixed it. Close down Firefox Open a terminal and run: firefox --allow-downgrade Let Firefox start up and create a new profile. Then go to: about:profiles You'll see something like this: Select "Set as default profile" and click through any warnings Close Firefox. Once again, run firefox --allow-downgrade That should do it! Next…
Continue reading →
(Mostly written to prevent me forgetting) In about:config add this setting ui.caretBlinkTime of type integer. Then set the number to how many milliseconds between blinks. 250 is very quick, 500 is about normal. I tend to go for about 400. Set it to 0 if you don't want it to blink at all. Click the ✅ button and your caret blink speed will immediately change. You can see more configuration options in the source code. …
Continue reading →
Here's how to stop Firefox automatically turning on dark-mode for websites. In the address bar, type in about:config and press ⏎ and accept the warning it gives you. Add a new value ui.systemUsesDarkTheme set it to type number and pick one of the following: 0 to tell websites to always use the light theme. 1 to tell websites to always use the dark theme. 2 to tell websites you have no preference. Dev Tools If you want to do this on a one-off basis, open up the Dev Tools and click on t…
Continue reading →
Whenever I open Twitter in a new tab on my phone, the page layout looks weird for a few seconds. It starts out looking like the desktop view and then, after a few seconds, it snaps back to the mobile view. What's causing this? Try opening this link to a window size detector in a background tab. Then visit that tab. On Chrome, this is what I see. If I hit the refresh button on that tab, the Outer window size snaps back: What's going on? According to the specification: The…
Continue reading →
Here's a curious bug I just discovered in Firefox 67 for Linux. Can you see this unicorn: →🦄 ← What happens if you use CSS to change the opacity of an emoji? Here's a unicorn, with a pink font colour: 🦄 Unicorn Let's wrap that in this scrap of CSS to make it 50% opaque. color: rgba(255, 105, 180, 0.5); 🦄 Unicorn Hopefully, you see a semi-transparent philosophical argument. What if we set the opacity to 0.0 - that is, completely transparent? 🦄 Unicorn There's a shunicorn there. If you …
Continue reading →
The new Firefox is out! Powered by the ludicrous-speed quantum engine - it really is a marvel to behold. Unfortunately, there's a rather annoying bug in the way it renders placeholder text. Consider the following HTML: <textarea placeholder="In loving memory of Buffy Anne Summers She saved the world A lot..."></textarea> This should render a textarea (a multi-line input box) pre-filled with placeholder text. The text should be over multiple lines. Instead, it renders like this: Is that …
Continue reading →
Take a look at the following text, looks normal enough doesn't it? "Harry ".draziw a si Potter Now, try to select the text and see what happens. WHAT WITCHCRAFT IS THIS?! If you examine the source code for this page, you'll see that I'm using the Unicode Bi-Directional characters. "Harry ‮".draziw a si ‭Potter These characters are useful when writing text that includes, say, English and Arabic - but they can also be used for malicious purposes. On a more mundane level, the…
Continue reading →
There is a new API in town! HTML5 will (soon) let you make the user's device vibrate. What fun! Obviously, it's useful for triggering alerts, improved immersivness during gameplay, and all sorts of other fun things like sending Morse Code messages via vibration. At the moment, Chrome (and other Android browsers) ask for permission before accessing features such as geo-location, camera, address book etc. This is a security measure to prevent your private information leaving your hands…
Continue reading →
It's really difficult cutting through the hype to see which browsers one should support when designing a website. There are many different measures of popularity - but many sites are only visited by techies, or only ever visited when at work, or are skewed towards the young or the old. Yesterday morning I asked the Number 10 Downing Street web team if they could provide their statistics. I figured that the PM's website gets enough readers from a wide selection of the web community to give a …
Continue reading →