MediaWiki:Footer.js

// __NOWYSIWYG__ '; $.get('http://merlin.wikia.com/wiki/MediaWiki:Bottom_nav?action=render') .done(function (data) {       $(function  { $("#WikiaArticle").append(footerHr + data + footerSearch); // the following was culled from: https://github.com/Wikia/app/tree/dev/skins/oasis/js/Search.js           $.loadJQueryAutocomplete .done(function {               'use strict';                $('#WikiaSearch2').find('input[name="search"]')                .autocomplete({ serviceUrl: mediaWiki.config.get('wgServer') + mediaWiki.config.get('wgScript') + '?action=ajax&rs=getLinkSuggest&format=json', onSelect: function(value, data, event) { var valueEncoded = encodeURIComponent(value.replace(/ /g, '_')), // slashes can't be urlencoded because they break routing location = mediaWiki.config.get('wgArticlePath'). replace(/\$1/, valueEncoded). replace(encodeURIComponent('/'), '/'); WikiaSearchApp.trackInternal('search_start_suggest', {                           'sterm': valueEncoded,                            'rver': 0                        }); if (event.button === 1 || event.metaKey || event.ctrlKey) { window.open(location); } else { window.location.href = location; }                       return false; },                   appendTo: '#WikiaSearch2', deferRequestBy: 400, minLength: 3, maxHeight: 1000, selectedClass: 'selected', width: '300px', skipBadQueries: true // BugId:4625 - always send the request even if previous one returned no suggestions });           });        })    }); }); //