Initial commit

This commit is contained in:
Jakub Nowak 2025-02-09 16:17:12 +08:00
commit 744e2063ae
22 changed files with 666 additions and 0 deletions

24
js/class/data.js Normal file
View file

@ -0,0 +1,24 @@
const ANIMUS_DATA = "animusData";
class Data {
constructor() {
this.theme = "melanosis";
}
load() {
const data = window.localStorage.getItem(ANIMUS_DATA);
if(!data) return;
const obj = JSON.parse(data);
this.theme = obj.theme ?? "melanosis";
}
save() {
const data = JSON.stringify(this);
window.localStorage.setItem(ANIMUS_DATA, data);
}
}
const themeData = new Data();
themeData.load();
themeData.save();

1
js/class/util.js Normal file
View file

@ -0,0 +1 @@
function $(c) { return document.querySelector(c); }