Commit 47a9e502 authored by diesys's avatar diesys 🎈

fix crossorigin head; fix url night mode

parent 6a22acc0
......@@ -30,7 +30,7 @@
<script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js' integrity='sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1' crossorigin='anonymous'></script>
<script src='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js' integrity='sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM' crossorigin='anonymous'></script>
<script src='js/script.js' crossorigin='anonymous'></script>
<script src='js/script.js'></script>
<link rel='stylesheet' href='css/main.css' />
</head>
......
......@@ -35,19 +35,14 @@ window.onload = function () {
var d = new Date();
var hour = d.getHours();
if (urlVars["night"]) {
if (urlVars["night"] == "true") {
nightMode();
} else if (urlVars["night"] == "false") {
dayMode();
}
} else {
if (hour < 7 | hour > 18) {
if (hour < 7 | hour > 18) {
toggleTheme();
console.log('auto-enabling dark mode...')
} else
if (urlVars["night"]) {
toggleTheme();
console.log('auto-enabling dark mode...')
}
}
console.log('URL var detected: enabling dark mode...')
}
/////////// BINDING ///////////////////////////
// theme / logo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment