User:Handheld/global.js

function fixCrapSearch(event) { "use strict"; var suchText = this["query"].value; if (suchText.indexOf(":") != -1) { event.preventDefault; //event.stopPropagation; var loc = window.location.href; window.location = loc.substring(0, 6 + loc.indexOf("/wiki/")) + encodeURI(suchText); } }

var heart = document.getElementById("wds-company-logo-fandom-white");

heart.addEventListener("click", function(event) {   "use strict";    event.preventDefault;    //event.stopPropagation;    document.cookie = 'useskin=oasis; domain=fandom.com; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT;';    document.cookie = 'useskin=toast; expires=Fri, 31 Dec 1999 23:59:59 GMT;';    document.cookie = 'tracking-opt-in-status=rejected; domain=fandom.com; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT;';    document.cookie = 'tracking-opt-in-version=2; domain=fandom.com; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT;';    window.location.replace('/wiki/' + encodeURI(wgPageName)); });

var downlinks = document.createElement("span"); downlinks.innerHTML = 'Content, Footer';

heart.parentNode.parentNode.insertBefore(downlinks, heart.parentNode);

document.forms[0].addEventListener ("submit", fixCrapSearch); //document.body.style.width = "auto";

var uplink = document.createElement("img"); uplink.setAttribute( "onclick", "window.scrollTo(0, 0);" ); uplink.setAttribute( "alt", "↑" ); uplink.setAttribute( "src", "http://img2.wikia.nocookie.net/__cb20140413102022/mh3u/de/images/a/a1/Uplink.png" ); document.body.appendChild(uplink); document.body.setAttribute( "onscroll", 'uplink.setAttribute( "style" , "position:absolute; left:"+( window.pageXOffset + window.innerWidth * 7 / 8 )+"px; top:"+( window.pageYOffset + window.innerHeight * 2 / 3 )+"px; z-index:8;" );' );

document.getElementById('wpSave').disabled = false;