aboutsummaryrefslogtreecommitdiffhomepage
path: root/static.files/storage-db41da1a38ea3cb8.js
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2024-07-18 21:07:35 +0000
committerjohannst <johannst@users.noreply.github.com>2024-07-18 21:07:35 +0000
commit92f06485e47d6478d325fcab4946dae8493eb93a (patch)
tree3f2b00c72eca95142d3e4e5ea86d38bd9d7baba1 /static.files/storage-db41da1a38ea3cb8.js
parent3dfc8f0258ab0884eef50cc8f33b8666cdb4c3cf (diff)
downloadllvm-kaleidoscope-rs-92f06485e47d6478d325fcab4946dae8493eb93a.tar.gz
llvm-kaleidoscope-rs-92f06485e47d6478d325fcab4946dae8493eb93a.zip
deploy: 76150f48c81be3505d09ca68b5e5291b1c73837egh-pages
Diffstat (limited to 'static.files/storage-db41da1a38ea3cb8.js')
-rw-r--r--static.files/storage-db41da1a38ea3cb8.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/static.files/storage-db41da1a38ea3cb8.js b/static.files/storage-db41da1a38ea3cb8.js
deleted file mode 100644
index b872813..0000000
--- a/static.files/storage-db41da1a38ea3cb8.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func,reversed){if(arr&&arr.length>0){if(reversed){for(let i=arr.length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}let newHref;if(newThemeName==="light"||newThemeName==="dark"||newThemeName==="ayu"){newHref=getVar("static-root-path")+getVar("theme-"+newThemeName+"-css")}else{newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css"}if(!window.currentTheme){document.write(`<link rel="stylesheet" id="themeStyle" href="${newHref}">`);window.currentTheme=document.getElementById("themeStyle")}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0)}}) \ No newline at end of file