MediaWiki:Footer.js

// __NOWYSIWYG__ '; $.get('http://merlin.wikia.com/wiki/MediaWiki:Bottom_nav?action=render') .done(function (data) {       $(function ($) { $("#WikiaArticle").append(footerHr + data + footerSearch); // HOOK: Allow custom Reference Popups in the footer. if (window.dev && window.dev.ReferencePopups && window.dev.ReferencePopups.loadCustom) { window.dev.ReferencePopups.loadCustom; }           // the following was culled from: https://github.com/Wikia/app/tree/dev/skins/oasis/js/Search.js            // RED ALERT: jquery.autocomplete clashes with jquery.ui.autocomplete and will COMPLETELY BREAK //   the source mode editor (LinkSuggest will crash which then prevents switching from Visual to Source) $.loadJQueryAutocomplete .done(function {               $('#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('/'), '/'); 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 });           });        });    }); }(window, jQuery)); //