User:Jinkipp/global.js

document.querySelector("html").setAttribute("whitemode", localStorage.getItem("whitemode"))

var tools = document.querySelector(".tools"); var li = document.createElement('li'); li.innerHTML = "eruda"; li.id = "erudaid" li.setAttribute("onclick", "loaderuda"); tools.prepend(li); function loaderuda{ if (document.querySelector("#eruda") == undefined){ var script = document.createElement('script'); script.src="https://cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function { eruda.init eruda.add({			   name: 'CSS',			    init($el) {			        $el.html('{} ');			        this._$el = $el;			    },			    show { this._$el.show; }, hide { this._$el.hide; }, destroy {}			}); }	} }

document.addEventListener("keyup", function(e){ if (e.key == "I" && e.ctrlKey && e.shiftKey) {    loaderuda  } })

document.querySelector(".page-counter").appendChild(Object.assign(document.createElement("a"), {"innerHTML":"W",onclick:whitemode,id:"whitemode"}))

function whitemode{ var x;   if(localStorage.getItem("whitemode") == "true"){ x=false }else{ x=true }   console.log(x) localStorage.setItem("whitemode", x)   document.querySelector("html").setAttribute("whitemode", x) }

//left side stuff document.querySelector(".global-navigation__logo").outerHTML = "global profile global css global.js";

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MassCategorization/code.js',    ] });