blob: 627b8339d9a73010bc8a288e4b8e2673572fff98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
'use strict';
class Theme{
static theme = document.getElementById("theme");
static init()
{
if(Cookies.getCookie("theme") == ""){
Cookies.setYearCookie("theme", "styles/themes/colors-base.css");
}
}
static restore()
{
Theme.init();
Theme.theme.setAttribute("href", Cookies.getCookie("theme") + "?v=" + Date.now());
}
static set(sheet)
{
Cookies.setYearCookie("theme", sheet);
Theme.theme.setAttribute("href", sheet + "?v=" + Date.now());
}
}
Theme.restore();
|