mirror of
https://github.com/kittywitch/dork.dev.git
synced 2026-02-09 15:19:18 -08:00
deploy: 6ebd2ddee9
This commit is contained in:
parent
f2425e5742
commit
a7c0ae62b1
4 changed files with 31 additions and 31 deletions
20
static/colorscheme.js
Normal file
20
static/colorscheme.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
var radios = document.getElementsByName("color-scheme");
|
||||
var prev = localStorage.getItem("color-scheme");
|
||||
for (var i = 0; i < radios.length; i++) {
|
||||
var _this = radios[i];
|
||||
_this.checked = _this.value == prev;
|
||||
radios[i].addEventListener("change", function() {
|
||||
if (this.value !== prev) {
|
||||
prev = this.value;
|
||||
localStorage.setItem("color-scheme", this.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
var button = document.getElementById("clear-color-scheme");
|
||||
button.addEventListener("click", function() {
|
||||
for (var i = 0; i < radios.length; i++) {
|
||||
var _this = radios[i];
|
||||
_this.checked = false;
|
||||
localStorage.removeItem("color-scheme");
|
||||
}
|
||||
});
|
||||
9
static/nonoscript.js
Normal file
9
static/nonoscript.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
function nonoscriptImplementer() {
|
||||
var nonoscript = document.getElementsByClassName("nonoscript");
|
||||
console.log(nonoscript);
|
||||
for (let item of nonoscript) {
|
||||
console.log("meep!");
|
||||
item.classList.remove("nonoscript");
|
||||
}
|
||||
}
|
||||
window.onload = nonoscriptImplementer();
|
||||
Loading…
Add table
Add a link
Reference in a new issue