Detect System Theme Preference Change Using JavaScript / / No Comments JavaScript and CSS allow users to detect the user theme preference with CSS’ prefers-color-scheme media query. It’s standard these days to use that preference to show the dark or light theme on a given website. But what if the user changes their preference while using your app? To detect a system theme preference change using JavaScript, you need to combine matchMedia, prefers-color-scheme, and an event listener: window.matchMedia('(prefers-color-scheme: dark)') .addEventListener('change',({ matches }) ={ if (matches) { console.log("change to dark mode!") } else { console.log("change to light mode!") } }) The change event of the matchMedia API notifies you... more → Posted in: JavaScript Tagged with: Change, Detect, JavaScript, Preference, system, theme, using
Using the Adobe PDF EMbed API with Vue 3 / / No Comments A long time ago, ok, February of last year, I posted about using the Adobe PDF Embed library with Vue.js: Using the PDF Embed API with Vue.js. The main issue with our Embed library and libraries like Vue is a "chicken and egg" issue. Basically, our docs tell you to add an event listener for our library to load, but it’s possible that the library has loaded before you add the event listener. Raymond Camden… more → Posted in: JavaScript Tagged with: Adobe, EMbed, using
Using Google Maps with Alpine.js / / No Comments It’s been a little while since I’ve blogged about Alpine.js, and I thought an example of integratingGoogle Maps with it would be a good way to continue my path to becoming comfortable with the framework. I imagined it would be fairly simple, but in building a few demos I ran into some interesting issues that helped me learn a bit more about Alpine. Let’s take a look. Raymond Camden… more → Posted in: JavaScript Tagged with: Alpine.js, Google, maps, using
Using Auth0 Login with JavaScript – Some Tips / / No Comments Despite having worked at Auth0 a few years back, I never actually used their main identity product. (When I was there, I was part of a team working on a serverless offering.) It’s been in the back of my mind to try the product for some time now, but I never got around to it. This past week Adobe was shut down for the holiday so with a lot of free time, I decided I’d finally give it a shot. I got something working, but had some troubles with their documentation so I figured I’d share what I ran into, and some code as well in hopes it will be helpful for others. Raymond Camden… more → Posted in: JavaScript Tagged with: Auth0, JavaScript, Login, Some, tips, using
Store Nintendo Switch Screenshots in the Cloud using Pipedream / / No Comments I’ve been a gamer for my entire life, starting with the venerable Atari 2600 back when I was almost late for grade school because I was having a really good game of Space Invaders. Raymond Camden… more → Posted in: JavaScript Tagged with: cloud, Nintendo, Pipedream, Screenshots, Store, Switch, using
Learn to craft dynamic websites and apps using JavaScript and React for under $25 – VentureBeat / / No Comments Learn to craft dynamic websites and apps using JavaScript and React for under $ 25 VentureBeat “JavaScript” – Google News… more → Posted in: JavaScript Tagged with: apps, craft, dynamic, JavaScript, Learn, React, under, using, VentureBeat, websites
How to Create a Digital Clock Using HTML, CSS, and JavaScript – MakeUseOf / / No Comments How to Create a Digital Clock Using HTML, CSS, and JavaScript MakeUseOf “JavaScript” – Google News… more → Posted in: JavaScript Tagged with: Clock, create, digital, HTML, JavaScript, MakeUseOf, using
Google: No Need to Worry About Using JavaScript – Search Engine Journal / / No Comments Google: No Need to Worry About Using JavaScript Search Engine Journal “JavaScript” – Google News… more → Posted in: JavaScript Tagged with: about, Engine, Google, JavaScript, Journal, Need, search, using, Worry