Detect System Theme Preference Change Using JavaScript

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

China trials ‘Deadbeat Map’ app to monitor citizens’ debts as part of social credit score system – The Telegraph

China trials ‘Deadbeat Map’ app to monitor citizens’ debts as part of social credit score system  The Telegraph China Focus: Chinese map app holds debtors in check – Xinhua | English.news.cn  Xinhua Is someone in debt nearby? Court uses chat app to alert people  South China Morning Post China tests opening up social credit scores to social media platform WeChat with debt map  ABC News View full coverage on Google News “map app” – Google News… more →
Posted in: Interactive Maps

App turns GPS-enabled smartphones into high-tech map system – The Spokesman Review (registration)

App turns GPS-enabled smartphones into high-tech map systemThe Spokesman Review (registration)Click here to comment on this story ยป. Most recent Outdoors. new Ammi Midstokke: How suffering equates to glory, and other sports lies · Landers' words of wisdom: leave wildlife babies be · App turns GPS-enabled smartphones into high-tech map system … map app – Google News… more →
Posted in: Interactive Maps