Monday, May 16, 2022
This JavaScript snippet will extract a price from a DOM element, remove all alphanumeric characters, such as currency or symbols…
Tuesday, May 17, 2022
There’s an increasing trend of adding full-width (possibly full-height) YouTube video covers with autoplay. Using the YouTube Iframe API, this…
Monday, May 16, 2022
This is an old script, which helped a lot with the initial phase launching a project on all browsers and…
Monday, May 16, 2022
You definitely don’t need a plugin for this. Although there are plugins which help with creating a service worker and…
Monday, May 16, 2022
Here’s a cross-browser compatible way of getting query parameter from a URL or setting query parameters and reloading the page. An…
Monday, May 16, 2022
The latest Chrome version has stopped video autoplay if the video is not muted. Firefox and the other browsers will soon…
Monday, June 12, 2023
Every variable in JavaScript has a data type which dictates the values that can be stored in it. However, JavaScript…
Monday, May 16, 2022
The basic idea to make this comparison would be to get arrays of parts from the version numbers and then compare pairs…
Monday, May 16, 2022
This is a function to remove all double whitespaces and preceding line breaks. This is a function to replace all line…
Monday, May 16, 2022
In JavaScript, any variable can be used in a logical context, such as the condition of an if statement or…
Wednesday, June 15, 2022
Writing code in an async programming framework like node.js becomes super complex and unbearably ugly, superfast. You are dealing with…
Monday, February 27, 2023
Events are the bread and butter in UI development. They are frequently used to kick off JavaScript to deal with…