document.addEventListener("pjax:complete",tosetting),document.addEventListener("DOMContentLoaded",tosetting);function tosetting(){$("#settingWindow").hide(),localStorage.getItem("blur")=="false"?blur=0:blur=1,localStorage.getItem("yjjs")=="true"?yjjs=1:yjjs=0,localStorage.getItem("fpson")==null&&localStorage.setItem("fpson","1"),blur?document.getElementById("settingStyle").innerText="":document.getElementById("settingStyle").innerText=` *,*:not(.card-info)::before,*::after{ -webkit-backdrop-filter: none!important; backdrop-filter: none!important; -webkit-filter: none!important; filter: none!important; }`,setBlur=function(){blur=!blur,localStorage.setItem("blur",blur),blur?document.getElementById("settingStyle").innerText="":document.getElementById("settingStyle").innerText=` *{ -webkit-backdrop-filter: none!important; backdrop-filter: none!important; -webkit-filter: none!important; filter: none!important; }`},yjjs1=function(){yjjs=!yjjs,localStorage.setItem("yjjs",yjjs)},localStorage.getItem("blogTheme")=="acrylic"&&(document.getElementById("css").href=""),switchTheme=function(){document.getElementById("css").href==window.location.protocol+"//"+window.location.host+"/css/stylessimple.css"?(document.getElementById("css").href="",localStorage.setItem("blogTheme","acrylic")):(document.getElementById("css").href="/css/stylessimple.css",localStorage.setItem("blogTheme","simple"))},setColor=function(e){document.getElementById("themeColor").innerText=`:root{--lyx-theme:var(--lyx-${e})!important}`,localStorage.setItem("themeColor",e)},setFont=function(e){if(localStorage.setItem("font",e),e=="main")for(var a=document.querySelectorAll("body,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.aplayer"),t=0;ta[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.aplayer"),t=0;ta[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.aplayer"),t=0;t-1)return t.data}return 0},changeBg=function(e,a){let t=document.getElementById("web_bg");e.charAt(0)=="#"?(t.style.backgroundColor=e,t.style.backgroundImage="none"):t.style.backgroundImage=e,a||saveData("blogbg",e)};try{let e=loadData("blogbg",1440);e?changeBg(e,1):localStorage.removeItem("blogbg")}catch{localStorage.removeItem("blogbg")}if(fpssw=function(){localStorage.getItem("fpson")=="1"?localStorage.setItem("fpson","0"):localStorage.setItem("fpson","1")},$(".asetting").hide(),$("#backer").hide(),$("#"+localStorage.getItem("themeColor")).attr("checked",!0),localStorage.getItem("blur")=="false"&&(document.getElementById("blur").checked=!0),localStorage.getItem("yjjs")=="true"&&(document.getElementById("yjjs").checked=!0),localStorage.getItem("fpson")=="1"&&(document.getElementById("fpson").checked=!0),localStorage.getItem("sakurahide")=="false"?(document.getElementById("hideSakura").checked=!0,isSakura=1):localStorage.getItem("sakurahide")==null?(localStorage.setItem("sakurahide","false"),document.getElementById("hideSakura").checked=!0,isSakura=1):(setTimeout(stopp,1e3),isSakura=0),localStorage.getItem("aplayerhide")=="false"?document.getElementById("hideAplayer").checked=!0:localStorage.getItem("aplayerhide")==null?(localStorage.setItem("aplayerhide","false"),document.getElementById("hideAplayer").checked=!0):(doStuff=function(){flag=0;try{ap=aplayers[0],ap.list,flag=1}catch{setTimeout(doStuff,50);return}flag&&$(".aplayer-fixed").hide()},doStuff()),document.getElementsByClassName("reSettings")[0].onclick=function(){localStorage.clear(),window.location.reload()},toggleWinbox=function(){$("#settingWindow").fadeToggle(),document.getElementById("settingWindow").style.display!="none"&&(document.getElementById("settingWindow").style.display="flex")},fullScreen=function(){document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()},toggleAside=function(){const e=document.documentElement.classList;e.contains("hide-aside")?saveToLocal.set("aside-status","show",2):saveToLocal.set("aside-status","hide",2),e.toggle("hide-aside")},toggleAplayer=function(){$(".aplayer-fixed").toggle(),localStorage.getItem("aplayerhide")=="true"?localStorage.setItem("aplayerhide",!1):localStorage.setItem("aplayerhide",!0)},toggleSakuras=function(){isSakura=!isSakura,stopp(isSakura),localStorage.getItem("sakurahide")=="true"?localStorage.setItem("sakurahide",!1):localStorage.setItem("sakurahide",!0)},switchAside=function(){if(left)document.getElementById("aside-content").classList.add("right"),document.querySelector(".layout > div:first-child").classList.add("left"),localStorage.setItem("leftAside","false");else{document.getElementById("aside-content").className="aside-content",document.querySelector(".layout > div:first-child").className="";try{document.querySelector("#recent-posts").className="recent-posts"}catch{}localStorage.setItem("leftAside","true")}left=!left},left=1,localStorage.getItem("leftAside")=="true"||localStorage.getItem("leftAside")==null||switchAside(),localStorage.getItem("autoTheme")=="true"){document.getElementById("autoTheme").checked=!0,$("#con-mode,.rightMenu-item:has(.fa-moon)").hide();var l=new Date;l.getHours()<=7||l.getHours()>=19?(activateDarkMode(),localStorage.removeItem("theme")):(activateLightMode(),localStorage.removeItem("theme"))}if(location.href.indexOf("posts")!=-1){var o=new XMLHttpRequest,s=document.querySelector("#page-header").style.backgroundImage.split('url("')[1].split('")')[0];o.open("GET","https://apis.yisous.xyz/api/imageColor?imgurl="+s,!0),o.send(),o.onreadystatechange=function(){o.readyState===4&&o.status===200&&(document.getElementById("themeColor").innerText=`:root{--lyx-theme:${o.responseText}!important}`)}}toggleAutoTheme=()=>{if(localStorage.getItem("autoTheme")=="true")localStorage.setItem("autoTheme","false"),$("#con-mode,.rightMenu-item:has(.fa-moon)").show();else{localStorage.setItem("autoTheme","true");var e=new Date;e.getHours()<=7||e.getHours()>=19?(activateDarkMode(),localStorage.removeItem("theme")):(activateLightMode(),localStorage.removeItem("theme")),$("#con-mode,.rightMenu-item:has(.fa-moon)").hide()}}}