-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml_headers.html
33 lines (22 loc) · 989 Bytes
/
html_headers.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<style>
</style>
<script src="https://www.cssscript.com/demo/cookie-dark-mode-openlight/openLight.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/Darkmode.js/1.5.7/darkmode-js.min.js"></script> -->
<script>
function addDarkmodeWidget() {
// new Darkmode().showWidget();
window.openLight = new OpenLight("auto");
//use openLight.addBackgroundTag("some tag") to use currently unsupported tags
//Adds override to the list of classes that shouldn't use dark mode
openLight.addOverrideByClassName("override");
//Changing the default colors
openLight.openLightColors = {
darkBackgroundStyle: "rgb(30,30,38)",
lightBackgroundStyle: "rgb(255,255,255)",
darkForegroundStyle: "rgb(240,240,250)",
lightForegroundStyle: "rgb(30,30,40)"
}
//Initialize after settings are set
}
window.addEventListener('load', addDarkmodeWidget);
</script>