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:
Roy Wellington Ⅳ 2023-01-21 17:33:03 -05:00
parent 005fc0f00f
commit ee9e8cd0ec

View file

@ -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