Utilisateur:Mewtwo Ex/common.js
Apparence
Note : après avoir publié vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.
- Firefox / Safari : maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou appuyez sur Ctrl + F5 ou Ctrl + R (⌘ + R sur un Mac).
- Google Chrome : appuyez sur Ctrl + Maj + R (⌘ + Shift + R sur un Mac).
- Edge : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl + F5.
var mexMenuVisible = true; function mexSwitchMenu() { if(mexMenuVisible) { mexHideMenu(); } else { mexShowMenu(); } } function mexInitMenu() { // bouton menu var mexMenuDiv = document.createElement("DIV"); mexMenuDiv.innerHTML = "Menu"; mexMenuDiv.setAttribute("style", "position: absolute; padding: 5px; background-color: white; border-radius: 6px; border: 1px solid rgb(204, 204, 204); font-size: 14px; top: 5px; left: 5px; cursor: pointer; z-index: 150;"); mexMenuDiv.onclick = mexSwitchMenu; document.getElementById("mw-head").appendChild(mexMenuDiv); // menu document.getElementById("mw-panel").setAttribute("style", "width: 100%; padding: 0px; background-color: white; top: 40px; border-top: 1px solid rgb(204, 204, 204); text-align: center; font-size: 130%;"); document.getElementById("p-logo").style.display = "none"; document.getElementById("p-navigation-label").style.display = "block"; var e = document.querySelectorAll("div#mw-panel div.portal"); for(var i=0; i<e.length; i++) { e[i].style.backgroundSize = "100% 1px"; } document.getElementById("bodyContent").style.fontSize = "0.65em"; try { document.getElementById("toc").style.fontSize = "150%"; } catch (err) {} mexHideMenu(); } function mexHideMenu() { document.getElementById("content").style.marginLeft = "0"; document.getElementById("left-navigation").style.marginLeft = "0"; document.getElementById("mw-panel").style.display = "none"; mexMenuVisible=false; /* try { document.querySelector(".rcoptions").style.display = "none"; } catch (err) {} */ } function mexShowMenu() { document.getElementById("content").style.marginLeft = "11em"; document.getElementById("left-navigation").style.marginLeft = "11em"; document.getElementById("mw-panel").style.display = "block"; mexMenuVisible=true; /* try { document.querySelector(".rcoptions").style.display = "block"; } catch (err) {} */ } if(navigator.userAgent.indexOf("Android")!=-1) { //mexInitMenu(); }