This commit is contained in:
parent
489701a936
commit
b6e844aa4e
|
@ -15,12 +15,9 @@
|
|||
enable a manual dark mode toggle. When dark mode support improves I
|
||||
can probably remove this again. -->
|
||||
<script type="text/javascript">
|
||||
var params = new URLSearchParams(window.location.search)
|
||||
|
||||
function setMode(mode, val) {
|
||||
if (val) document.body.classList.add(mode)
|
||||
else document.body.classList.remove(mode)
|
||||
|
||||
Array.from(document.querySelectorAll('a'))
|
||||
.filter( el => el.href.indexOf('cosmic.voyage') !== -1)
|
||||
.map( el => {
|
||||
|
@ -39,6 +36,7 @@
|
|||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
var params = new URLSearchParams(window.location.search)
|
||||
if (params.has('dark')) {
|
||||
setMode('dark', true)
|
||||
} else if (params.has('light')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user