diff options
author | johannst <johannst@users.noreply.github.com> | 2021-07-01 21:12:07 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2021-07-01 21:12:07 +0000 |
commit | 69f1b8f726fb30b3628c2449bee7bee939801210 (patch) | |
tree | ae579acd2013b658d9d2a2877b09a25b21575ed8 /theme.js | |
parent | d2d2ba7c6602e73dc2e3dbd0aa4215e4c412a688 (diff) | |
download | mini-kvm-rs-69f1b8f726fb30b3628c2449bee7bee939801210.tar.gz mini-kvm-rs-69f1b8f726fb30b3628c2449bee7bee939801210.zip |
deploy: 9f025e829ab6ed468cfb51d72ac105624afc3851
Diffstat (limited to 'theme.js')
-rw-r--r-- | theme.js | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/theme.js b/theme.js deleted file mode 100644 index 8f9c49a..0000000 --- a/theme.js +++ /dev/null @@ -1 +0,0 @@ -var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="theme-picker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="theme-picker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["ayu","dark","light"].forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)})
\ No newline at end of file |