Merge pull request #118 from kasenvr/feature/js-doc-night

APIDocs theme toggle bugfix
This commit is contained in:
kasenvr 2020-01-24 08:18:49 -05:00 committed by GitHub
commit 96ecf39e3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,7 @@
//We are running the check here to preload the theme because it may load the incorrect one first for a split second.
var darkDisabled = JSON.parse(localStorage.getItem('darkDisabled'));
if (darkDisabled == null) {
localStorage.setItem('darkDisabled', JSON.stringify("false"));
localStorage.setItem('darkDisabled', JSON.stringify(false));
} else {
var nightSheet = document.querySelector('[href="styles/night.css"]');
nightSheet.disabled = darkDisabled;
@ -120,7 +120,7 @@
}),
created: function () {
},
methods: {
toggleNightMode: function() {