2018-01-28 23:22:43 +11:00
|
|
|
//テーマ適用
|
|
|
|
function themes(theme) {
|
|
|
|
if (!theme) {
|
|
|
|
var theme = localStorage.getItem("theme");
|
2018-03-13 04:41:38 +11:00
|
|
|
if(!theme){
|
|
|
|
var theme="black";
|
|
|
|
localStorage.setItem("theme","black");
|
|
|
|
}
|
2018-01-28 23:22:43 +11:00
|
|
|
}
|
2018-07-07 03:51:48 +10:00
|
|
|
$("html").removeClass("indigotheme");
|
|
|
|
$("html").removeClass("greentheme");
|
|
|
|
$("html").removeClass("browntheme");
|
|
|
|
$("html").removeClass("blacktheme");
|
2019-03-08 05:19:26 +11:00
|
|
|
$("html").removeClass("customtheme");
|
2018-07-07 03:51:48 +10:00
|
|
|
$("html").addClass(theme+"theme");
|
2018-07-05 11:26:07 +10:00
|
|
|
var font = localStorage.getItem("font");
|
|
|
|
if(font){
|
|
|
|
$("html").css("font-family",font);
|
|
|
|
}else{
|
|
|
|
$("html").css("font-family","");
|
|
|
|
}
|
2019-03-08 05:19:26 +11:00
|
|
|
if(theme=="custom"){
|
|
|
|
if(localStorage.getItem("customtheme-id")){
|
|
|
|
ipc.send('theme-css-request', localStorage.getItem("customtheme-id"));
|
|
|
|
}
|
|
|
|
}
|
2018-01-28 23:22:43 +11:00
|
|
|
}
|
2018-03-13 04:41:38 +11:00
|
|
|
themes();
|