Author: latz
-
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…
-
We need a LoDash for WordPress
in wordpressFor those who don’t know: LoDash is a utility library for JavaScript that contains functions that make common tasks easier. You could write them yourself, but LoDash functions are optimised and well tested, so you don’t have to reinvent the wheel. The problem WordPress is a bit like a programming language. You have a set…
-
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.
-
Pushing the Newsblur new stories limit (if you’re self-hosting)
Newsblur is my RSS reader of choice. Nevertheless, it has a limitation that bothered me right from the start. For reasons not known to me, there’s a limit of 200 items per feed. That’s a bit frustrating because high traffic sites like HackerNews easily have more than 200 items a day. Newsblur’s websites stats that…
-
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().…
-
Using JavaScript modules in your WordPress plugins
in wordpressModules are nothing new in JavaScript programming, and it’s a good practice to modularize your code. WordPress does not offer the option to load scripts as modules out of the box. There’s a ticket from mid 2022, but it hasn’t gained much traction yet. So we need a workaround for the time being. Fortunately, WordPress…
-
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…
-
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…
-
Download previous versions of WordPress plugins
in wordpressThere’s a simple way to get hold of previous versions of your WordPress plugins, for example if a current version breaks your setup.