refactor(client): specify global scope

This commit is contained in:
syuilo 2022-01-16 10:14:14 +09:00
parent b312846ff6
commit 8322c90834
30 changed files with 75 additions and 75 deletions

View file

@ -34,11 +34,11 @@ export const builtinThemes = [
let timeout = null;
export function applyTheme(theme: Theme, persist = true) {
if (timeout) clearTimeout(timeout);
if (timeout) window.clearTimeout(timeout);
document.documentElement.classList.add('_themeChanging_');
timeout = setTimeout(() => {
timeout = window.setTimeout(() => {
document.documentElement.classList.remove('_themeChanging_');
}, 1000);