nickdeny / darkmode.js Goto Github PK
View Code? Open in Web Editor NEW🌒 Lightweight and powerful library that add dark theme to website based on user's time & OS appearance
Home Page: https://nickdeny.github.io/darkmode.js/
License: MIT License
🌒 Lightweight and powerful library that add dark theme to website based on user's time & OS appearance
Home Page: https://nickdeny.github.io/darkmode.js/
License: MIT License
Hello @nickdeny ,
I have set the startAt property to '00:00' and endAt property to '23:00' but it not automatically setting ist's mode based on the time
var options = {
dark: 'dark.css',
light: 'light.css',
startAt: '00:00',
endAt: '23:00',
checkSystemScheme: true,
saveOnToggle: false
};
darkMode = new DarkMode(options);
Hi @nickdeny,
This project seems interesting. Have you considered publishing this as an NPM module? That would make it much easier to get started. Thanks!
P.S. It is a little unclear how exactly this is supposed to be used. Are we supposed to copy darkmode.min.js
and add our own light.css
and dark.css
styles?
В примере работает по кнопке, когда на свой сайт загружаю не работает!
(index):1921 Uncaught ReferenceError: Cannot access 'DarkMode' before initialization
Hello friend first thank you very much for the incredible library that is being of great help on my website.
I would like to know if it is possible to use some kind of effect for the transition from light and dark modes (like a fadein) or using animate.css for example. So that it is not a quick change for the user's visualization.
Hi Nick,
It seems that darkmode.js does not work on the most recent versions of Safari (13.0.4) and Firefox (73.0.1). However, this seems to work fine under Chrome (80.0.3987.122).
I am in the middle of the afternoon and https://nickdeny.github.io/darkmode-js/ page is displayed in dark mode on Safari and Firefox but in light mode with Chrome.
Maybe this problem comes from recent updates to Safari and Firefox? Indeed, it was still working pretty well two weeks ago.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.