Category: programming
-
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
in programmingVisual 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
in programmingRecently 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
in programmingThe 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…
-
Firefox Addon: Add options menu to addon icon
Especially during development it’s annoying to reach the option page of a Firefox addon: Hamburger Addons and Themes … Options There should be a faster way. At least for your own Add-ons you can quite easily add an “Options” menu item to the browser action: Additionally to have to add a new permission to the…
-
Set selections in a multiple select element with ES6
in programmingIf you’re looking on the web for a solution to programmatically set the selections of a multiple select element in JavaScript you most likely find answers using jQuery, an indexed loop and an if condition, or some other complicated stuff. Modern browsers and ES6 gives you a simple solution in (almost) a single line of…
-
Show your desktop
I know loads of WordPress developers by name and have an idea how they look. What I also find interesting is the way people work. Do they use a laptop, how many monitors do they use and other stuf). Here’s my desktop (I’ve tidied it up before taking the image :-)): The machine is an…
-
HTML/PHP: Single and double quotes
in programmingIf PHP programmers are creating a link from variables often you can see the following code: echo ” . $linktext . ”; or ?>