Skip to content

Instantly share code, notes, and snippets.

View tzt345's full-sized avatar
😁
A guy who wants coding

tzt345

😁
A guy who wants coding
View GitHub Profile
@whirlxd
whirlxd / readme.md
Created July 6, 2021 11:42
How to Add Darkmode to your website? [Darkmode.js]

How to ?

first step:
add this code in your html page

<script src="https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js"></script>
<script>
  function addDarkmodeWidget() {
    new Darkmode().showWidget();
  }
 window.addEventListener('load', addDarkmodeWidget);