User:Klap Trap/global.js

importScriptPage('SkinSwitchButton/code.js', 'dev');

/* AwesomeSearch */ var searchForm = document.getElementById("searchForm"); var searchInput = document.getElementById("searchInput"); searchForm.addEventListener ("submit", function(event) { "use strict";  if (searchInput.value.indexOf(":") != -1) {    event.preventDefault;    window.location = '/wiki/' + encodeURI(searchInput.value);  } });

/* Revert to old Wikia Activity Module */ if ($('#WikiaRail').length) { $('#WikiaRail').bind('DOMNodeInserted', function {   $(this).removeClass('wikia-rail');   }); }