Fasten even more theme switch
This commit is contained in:
parent
5f93159e9d
commit
5b8504401c
3 changed files with 15 additions and 12 deletions
|
@ -31,14 +31,6 @@ function getCurrentValue(name) {
|
|||
function switchTheme(styleElem, mainStyleElem, newTheme) {
|
||||
styleElem.href = mainStyleElem.href.replace("rustdoc.css", newTheme + ".css");
|
||||
updateLocalStorage('theme', newTheme);
|
||||
/*var elem = document.getElementsByTagName('body')[0];
|
||||
if (elem) {
|
||||
updateLocalStorage('background', getComputedStyle(elem)['background-color']);
|
||||
}*/
|
||||
}
|
||||
|
||||
/*var elem = document.getElementsByTagName('body')[0];
|
||||
if (elem) {
|
||||
var value =
|
||||
}*/
|
||||
switchTheme(currentTheme, mainTheme, getCurrentValue('theme') || 'main');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue