Blog
JavaScript Snippet – Unicode Emoji As A Favicon
Would you like to learn how to easily set a unicode emoji as a favicon on any web page with a few lines of JavaScript? Check out this short video! Here is the GitHub Gist:
All blog posts on the front page.
Would you like to learn how to easily set a unicode emoji as a favicon on any web page with a few lines of JavaScript? Check out this short video! Here is the GitHub Gist:
Recently I wrote a Google Script Web App that generated JavaScript code and needed to run on a Google Site. Even though I tested everything both on my computer and on my phone I didn’t realize that if someone tried to access the same code while logged in as a Read more…
Have you ever wanted to source a GitHub Gist within an <iframe>? Yesterday, I was writing a trainual document for work that needed to include Apex code which of course includes code that is misinterpreted as HTML ( eg. List<Object>…) after you save it and want to edit it again. Read more…
Have you ever used JSBin or CodePen and wondered how you can accomplish something like they do on those sites? Of course, CodePen is much more advanced and has more options but if you ever want to combine JavaScript code and CSS code into a full or partial HTML document Read more…
Regular expressions are a great way to parse, match and modify strings of all sorts. Let’s learn some different ways that we can use them in Apex by way of some examples that you can run in the Developer Console. Pattern.matches(…) First we will learn how to use Pattern.matches(…) for Read more…
When writing an Aura Lightning Component you can use the following to update data for standard components as detailed on this page: Unfortunately, with Lightning Web Components you cannot run the above code as is. Fortunately, you can easily modify the above to make it work in an LWC. All Read more…
Did you know that you cannot use querySelectorAll() function on <template> elements? By that I mean that the following code will in fact not return any results: The same thing can be said about trying to use querySelectorAll() function on <template> elements: This even happens when calling either one of Read more…
I recently wanted to create my own simple loading spinner with just HTML and CSS. Here is the code that I came up with: HTML CSS See It In Action Below is what it looks like in action. I added a few inputs so that you can play around with Read more…
In JavaScript you can create a function by using the Function constructor: The above code produces a sum() function which takes 1 or more arguments and returns the sum of them all added together. You can check out the following to see this in action: What About AsyncFunction()? You may Read more…
A few months ago I wrote a quick post showing how to parse JSONC (JSON with comments) files in JavaScript. Shortly thereafter I adapted the code to work in PHP as well: This function takes the same arguments that you can pass to the native json_decode() function. Besides removing JavaScript Read more…