Rollup merge of #48831 - GuillaumeGomez:fix-theme-blink, r=QuietMisdreavus
Fix blink when main theme is selected r? @QuietMisdreavus
This commit is contained in:
commit
c65ee94365
1 changed files with 5 additions and 1 deletions
|
|
@ -44,8 +44,12 @@ function switchTheme(styleElem, mainStyleElem, newTheme) {
|
|||
var fullBasicCss = "rustdoc" + resourcesSuffix + ".css";
|
||||
var fullNewTheme = newTheme + resourcesSuffix + ".css";
|
||||
var newHref = mainStyleElem.href.replace(fullBasicCss, fullNewTheme);
|
||||
var found = false;
|
||||
|
||||
if (styleElem.href === newHref) {
|
||||
return;
|
||||
}
|
||||
|
||||
var found = false;
|
||||
if (savedHref.length === 0) {
|
||||
onEach(document.getElementsByTagName("link"), function(el) {
|
||||
savedHref.push(el.href);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue