Différences entre les versions de « MediaWiki:Vector.js »

Aller à la navigation Aller à la recherche
107 octets ajoutés ,  18 février 2022 à 16:54
aucun résumé de modification
(Created page with "→‎All JavaScript here will be loaded for users of the Vector skin : const wikiStorage = window.localStorage; var darkMode = wikiStorage.getItem('darkMode'); if (darkMode == null) { window.localStorage.setItem('darkMode', 0); } var footerLinks = document.getElementById('footer-places'); var modeSwitch = document.createElement('li'); modeSwitch.setAttribute('id', 'footer-places-skin-mode'); modeSwitch.setAttribute('onclick', 'switchSkin()'); function switchSkinShared(...")
 
Ligne 7 : Ligne 7 :


var footerLinks = document.getElementById('footer-places');
var footerLinks = document.getElementById('footer-places');
var modeSwitch = document.createElement('li');
var modeSwitchBase = document.CreateElement('li')
modeSwitch.setAttribute('id', 'footer-places-skin-mode');
var modeSwitch = document.createElement('a');
modeSwitchBase.setAttribute('id', 'footer-places-skin-mode');
modeSwitch.setAttribute('onclick', 'switchSkin()');
modeSwitch.setAttribute('onclick', 'switchSkin()');


Ligne 30 : Ligne 31 :
wikiStorage.setItem('darkMode', 0 );
wikiStorage.setItem('darkMode', 0 );
}
}
wikiStorage.getItem('darkMode');
darkMode = wikiStorage.getItem('darkMode');
switchSkinShared();
switchSkinShared();
}
}


switchSkinShared();
switchSkinShared();
footerLinks.appendChild(modeSwitch);
modeSwitchBase.appendChild(modeSwitch)
footerLinks.appendChild(modeSwitchBase);
1 124

modifications

Menu de navigation