User:Timeshifter/global.js

/* Create purge button in edit menu */ /* See http://dev.wikia.com/wiki/PurgeButton */

PurgeButtonText = 'purge'; importScriptPage('PurgeButton/code.js', 'dev');

/* Open search results in new tab */

$(function {    $('#WikiaSearch, #search').attr({ target: '_blank' }); }); WikiaSearchApp.initSuggest = function { $.loadJQueryAutocomplete(function {        WikiaSearchApp.searchField.autocomplete({ serviceUrl: wgServer + wgScript + "?action=ajax&rs=getLinkSuggest&format=json", onSelect: function (a, b) { WikiaSearchApp.track("suggest"); WikiaSearchApp.trackInternal("search_start_suggest", {                   sterm: encodeURIComponent(a.replace(/ /g, "_")),                    rver: 0                }); window.open(wgArticlePath.replace(/\$1/, encodeURIComponent(a.replace(/ /g, "_")))); },           appendTo: "#WikiaSearch", deferRequestBy: 250, maxHeight: 1000, selectedClass: "selected", width: "270px", skipBadQueries: true })   }) };