-

·
Bold text without jumping: Text shadows instead of font-weight
You have seen this effect, even if you rarely notice it consciously: you hover over a navigation menu, the item turns bold, and the whole menu twitches. The neighbours shift a few pixels to the side, a line suddenly wraps differently, a right-aligned number hops. It is only a detail, but it makes a page…
-

·
NodeJS: async.queue does not display error messages by default
Currently, I’m creating a custom web crawler and the easiest method to implement concurrency is to use the npm package “async“. While coding, I came across the problem, that the program wasn’t working correctly, but the terminal didn’t display any errors. So I tested the queued function outside of async, and it threw an error…
-

·
Javascript – Rounding floating point numbers
There are six different functions in JavaScript’s Math library for rounding floating point numbers: What is the difference between these functions? abs() abs() is the absolute value of a number. Mathematically speaking, it is the distance of a number from zero. As a distance cannot be negative, the absolute value is always the positive value…
-

·
Weekend project: Jump to Header
Some time ago, I came across the browser “Nyxt“. I found one feature particularly practical, namely the option of displaying the headings (<H1> to <H6>) in a side panel. Chrome also contains a side panel for some time now. The above feature could be displayed in this. A quick search in the Webstore revealed that…
-

·
My 10 simple UX rules
Creating a user interface that offers a positive user experience (UX) requires a certain level of skill, and admittedly, design is not my primary area of expertise as I am a programmer. Nevertheless, I have gathered some fundamental principles over the years that aid me in delivering a satisfactory user interface. 1. Always respond to…
-

·
VSCode keyboard shortcuts I’m actually using
Visual Studio Code contains centillions of keyboard shortcuts, but in everyday life I use only a fraction of them. I have also mapped them to key combinations that are easier to access. These three-finger shortcuts are really crazy, while others I never use, like “Cursor Undo”, are mapped to “Ctrl-U”.Your mileage may vary, but I…
-

·
How to loop through an array with a variable starting element
Recently I was faced with an interesting problem. I needed to create a simplified (pseudo-) cron interface: The task is to find the next selected day.
-

·
The modern way of checking radio groups
Checking radio groups in JavaScript has always been a bit tricky because you can only check if a particular radio button is selected, not the whole group at once. Wow, that looks archaic. There must be a better way using the new ES6 features, and there is! As of ES2015, NodeList contains a forEach method().…
-
·
Chrome side panel: Simulate close event
The new side panel in Chrome does not contain a close event, which could come handy if you want to clean up stuff after the panel has been closed. You can simulate the event by opening a permanent connection between the side panel and the background script. This connection fires an onDisconnect event if the…
-
·
Chrome extensions, Manifest v3 and local storage views
The other day I started coding a Chrome extension that makes heavy use of Chrome’s IndexedDB. Until this time then I had no problem inpecting any local storage using the DevTool’s “Application” tab. Those were extensions that used Manifest v2 but as of June 2023 Google will only acept Manifest v3 extensions.One of the main…