Skip to content

Commit d7bf051

Browse files
Remove dead code
1 parent 74c09b4 commit d7bf051

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

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

-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// the page, so we don't see major layout changes during the load of the page.
66
"use strict";
77

8-
const darkThemes = ["dark", "ayu"];
98
window.currentTheme = document.getElementById("themeStyle");
109
window.mainTheme = document.getElementById("mainThemeStyle");
1110

@@ -228,14 +227,6 @@ function switchToSavedTheme() {
228227
}
229228

230229
if (isUsingSystemTheme() && window.matchMedia) {
231-
// update the preferred dark theme if the user is already using a dark theme
232-
// See https://github.com/rust-lang/rust/pull/77809#issuecomment-707875732
233-
if (getTheme() === null
234-
&& getSettingValue("preferred-dark-theme") === null
235-
&& darkThemes.indexOf(getTheme()) >= 0) {
236-
updateLocalStorage("preferred-dark-theme", getTheme());
237-
}
238-
239230
// call the function to initialize the theme at least once!
240231
updateSystemTheme();
241232
} else {

0 commit comments

Comments
 (0)