Skip to content

Commit

Permalink
Rollup merge of rust-lang#48831 - GuillaumeGomez:fix-theme-blink, r=Q…
Browse files Browse the repository at this point in the history
…uietMisdreavus

Fix blink when main theme is selected

r? @QuietMisdreavus
  • Loading branch information
kennytm committed Mar 14, 2018
2 parents 4ea78d4 + 366ee85 commit c65ee94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustdoc/html/static/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c65ee94

Please sign in to comment.