Skip to content

Commit ee9e8cd

Browse files
committed
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.
1 parent 005fc0f commit ee9e8cd

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/librustdoc/html/static/js/storage.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -153,22 +153,6 @@ function switchTheme(styleElem, mainStyleElem, newThemeName, saveTheme) {
153153
}
154154
}
155155

156-
// This function is called from "main.js".
157-
// eslint-disable-next-line no-unused-vars
158-
function useSystemTheme(value) {
159-
if (value === undefined) {
160-
value = true;
161-
}
162-
163-
updateLocalStorage("use-system-theme", value);
164-
165-
// update the toggle if we're on the settings page
166-
const toggle = document.getElementById("use-system-theme");
167-
if (toggle && toggle instanceof HTMLInputElement) {
168-
toggle.checked = value;
169-
}
170-
}
171-
172156
const updateSystemTheme = (function() {
173157
if (!window.matchMedia) {
174158
// fallback to the CSS computed value

0 commit comments

Comments
 (0)