禁止把 Windows PATH 注入到 WSL
禁止把 Windows PATH 注入到 WSL
配置WSL内存和swap
配置WSL内存和swap
解决vmware虚拟机占用磁盘空间过大的问题
解决vmware虚拟机占用磁盘空间过大的问题
r chatCellDom = document.getElementById("quote-" + quote.getAttribute("quotedCellTag")); if (chatCellDom) { var chatDiv = chatCellDom.parentElement; var mid = chatDiv.clientHeight / 2; var offsetTop = chatCellDom.offsetTop; if (offsetTop > mid - chatCellDom.clientHeight / 2) { chatDiv.scrollTo({ top: chatCellDom.offsetTop - mid + chatCellDom.clientHeight / 2, behavior: "smooth" }); } else { chatDiv.scrollTo({ top: 0, behavior: "smooth" }); } chat_quote_obverser.observe(chatCellDom); } }); }); }); ibute('data-theme', theme) } const iframe = document.querySelector('#comments > section.giscus > iframe') if (iframe) { // This works after giscus loaded. const src = iframe.src const newSrc = src.replace(/theme=[\w]+/, `theme=${theme}`) iframe.src = newSrc } } const switchTheme = () => { // light -> dark -> auto -> light -> ... const currentTheme = document.documentElement.getAttribute('data-theme') let newTheme; switch (currentTheme) { case 'light': newTheme = 'dark' break case 'dark': newTheme = 'auto' break default: newTheme = 'light' } applyTheme(newTheme) window.localStorage.setItem('Stellar.theme', newTheme) utils.dark.mode = newTheme === 'auto' ? (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light") : newTheme; utils.dark.method.toggle.start(); const messages = { light: `切换到浅色模式`, dark: `切换到深色模式`, auto: `切换到跟随系统配色`, } hud?.toast?.(messages[newTheme]) } (() => { // Apply user's preferred theme, if any. const theme = window.localStorage.getItem('Stellar.theme') if (theme !== null) { applyTheme(theme) } else { utils.dark.mode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } utils.dark.method.toggle.start(); })()