From 69f1b8f726fb30b3628c2449bee7bee939801210 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 1 Jul 2021 21:12:07 +0000 Subject: deploy: 9f025e829ab6ed468cfb51d72ac105624afc3851 --- theme.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 theme.js (limited to 'theme.js') 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 -- cgit v1.2.3