This function appears to be unused
The comment says that it is called from main.js, but there don't seem to be any references to it in main.js. A quick ripgrep says there are no references in all of librustdoc.
This commit is contained in:
parent
005fc0f00f
commit
ee9e8cd0ec
1 changed files with 0 additions and 16 deletions
|
|
@ -153,22 +153,6 @@ function switchTheme(styleElem, mainStyleElem, newThemeName, saveTheme) {
|
|||
}
|
||||
}
|
||||
|
||||
// This function is called from "main.js".
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function useSystemTheme(value) {
|
||||
if (value === undefined) {
|
||||
value = true;
|
||||
}
|
||||
|
||||
updateLocalStorage("use-system-theme", value);
|
||||
|
||||
// update the toggle if we're on the settings page
|
||||
const toggle = document.getElementById("use-system-theme");
|
||||
if (toggle && toggle instanceof HTMLInputElement) {
|
||||
toggle.checked = value;
|
||||
}
|
||||
}
|
||||
|
||||
const updateSystemTheme = (function() {
|
||||
if (!window.matchMedia) {
|
||||
// fallback to the CSS computed value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue