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"; 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 = erudaonl } } li.setAttribute("onclick", "loaderuda"); tools.prepend(li); var bruh = document.createElement("script") bruh.innerHTML="function erudaonl {"+ "eruda.init;"+ "eruda.add({"+		"name: 'CSS',"+		"init($el) {"+			"$el.html('{} ');"+			"this._$el = $el; },"+		"show { this._$el.show; }, hide { this._$el.hide; }, destroy {}"+	"});"+ "}" document.body.appendChild(bruh)

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',    ] });