16 lines
312 B
JavaScript
16 lines
312 B
JavaScript
//テーマ適用
|
|
function themes(theme) {
|
|
if (!theme) {
|
|
var theme = localStorage.getItem("theme");
|
|
if(!theme){
|
|
var theme="black";
|
|
localStorage.setItem("theme","black");
|
|
}
|
|
}
|
|
if (theme == "black") {
|
|
$("html").addClass("blacktheme");
|
|
} else {
|
|
$("html").removeClass("blacktheme");
|
|
}
|
|
}
|
|
themes(); |