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

Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
This commit is contained in:
Michael Howell 2023-02-18 10:28:58 -07:00
parent d4dce3e200
commit 255fdb398e

View File

@ -150,7 +150,7 @@ function switchTheme(newThemeName, saveTheme) {
}
if (!window.currentTheme) {
document.write("<link rel=\"stylesheet\" id=\"themeStyle\" href=\"" + newHref + "\">");
document.write(`<link rel="stylesheet" id="themeStyle" href="${newHref}">`);
window.currentTheme = document.getElementById("themeStyle");
} else if (newHref !== window.currentTheme.href) {
window.currentTheme.href = newHref;