User:Pecoes/global.js

Sine = { sine: '' + String.fromCharCode(126) };

importScriptPage('Sine/code.js', 'dev'); importScriptPage('FixWantedFiles/code.js', 'dev'); importScriptPage('FastDelete/code.js', 'dev'); importScriptPage('AjaxUndo/code.js', 'dev'); importScriptPage('PurgeButton/code.js', 'dev' ); importScriptPage('SearchGoButton/code.js', 'dev');

var menu = [ ['JE Modding', 'http://jadeempire-modding.wikia.com/', ['Admin Dashboard', 'http://jadeempire-modding.wikia.com/wiki/Special:AdminDashboard'], ['Wikia.css', 'http://jadeempire-modding.wikia.com/wiki/MediaWiki:Wikia.css'], ['Common.js', 'http://jadeempire-modding.wikia.com/wiki/MediaWiki:Common.js'] ],   ['Pecoes', 'http://pecoes.wikia.com/', ['Sandbox', 'http://pecoes.wikia.com/wiki/Sandbox'], ['Common.js', 'http://pecoes.wikia.com/wiki/MediaWiki:Common.js'], ['Wikia.css', 'http://pecoes.wikia.com/wiki/MediaWiki:Wikia.css'], ['Special Pages', 'http://pecoes.wikia.com/wiki/Special:SpecialPages'], ['All Pages', 'http://pecoes.wikia.com/wiki/Special:AllPages'], ['MediaWiki Pages', 'http://pecoes.wikia.com/index.php?title=Special%3AAllPages&namespace=8'], ['Templages', 'http://pecoes.wikia.com/index.php?title=Special%3AAllPages&namespace=10'] ],   ['Community Central', 'http://community.wikia.com/wiki/Special:WikiActivity', ['Admin Forum', 'http://community.wikia.com/wiki/Admin_Central:Forum'], ['Community Forum', 'http://community.wikia.com/wiki/Forum:Community_Central_Forum'] ],   ['Dev', 'http://dev.wikia.com/wiki/Special:WikiActivity', ['Cheatsheet', 'http://dev.wikia.com/wiki/JS_and_CSS_Cheatsheet'], ['JavaScript', 'http://dev.wikia.com/wiki/List_of_JavaScript_Enhancements'], ['Sine', 'http://dev.wikia.com/wiki/Sine'], ['InfoWidgets', 'http://dev.wikia.com/wiki/InfoWidgets'], ['InactiveUsers', 'http://dev.wikia.com/wiki/InactiveUsers'] ],   ['API', 'http://pecoes.wikia.com/api.php', ['API Docs', 'http://www.mediawiki.org/wiki/API'], ['API Explorer', 'http://pecoes.wikia.com/wiki/Special:ApiExplorer'] ],   ['MediaWiki', 'http://www.mediawiki.org/', ['Magic Words', 'http://www.mediawiki.org/wiki/Help:Magic_words'], ['Parser Functions', 'http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions'], ['JavaScript Interface', 'http://www.mediawiki.org/wiki/Manual:Interface/JavaScript'] ] ];

function renderMenu (menu) { if (undefined == window.wgUserName) return ''; var html = ''; html += ''; html += ''; html += ''; if (undefined != menu && menu instanceof Array) { html += ''; for (var i = 0; i < menu.length; i++) { html += renderMenuLevelOne(menu[i]); }       html += ""; }   html += ''; return html; }

function renderMenuLevelOne (menu) { if (undefined == menu || !(menu instanceof Array)) return ' '; var url, title, html; title = typeof menu[0] == 'string' ? menu[0] : 'undefined'; url  = typeof menu[1] == 'string' ? menu[1] : 'undefined'; html = ''; html += '' + title; if (menu.length > 2) { html += ''; html += ''; html += ''; for (var i = 2; i < menu.length; i++) { html += renderMenuLevelTwo(menu[i]); }       html += ""; }   else html += ''; html += ''; return html; }

function renderMenuLevelTwo (menu) { var url, title, html; title = typeof menu[0] == 'string' ? menu[0] : 'undefined'; url  = typeof menu[1] == 'string' ? menu[1] : 'undefined'; html = '<a class="subnav-3a" href="' + url + '">' + title + '</a></li>'; return html; }

if ('undefined' == typeof window.disableCustomMenu) { WikiHeaderV2.initDelayed = WikiHeaderV2.init; WikiHeaderV2.init = function {}; $(function {        // bookmark menu:        $('#WikiHeader nav ul:first').append(renderMenu(menu));        $('#WikiHeader > nav').css({ width: "580" });        var navWidth = 0;         $('#WikiHeader > nav > ul > li').each(function  { navWidth += $(this).width; });        if (560 < navWidth) $('#WikiHeader > nav > ul > li > a').css({ paddingLeft: "11px", paddingRight: "11px" });        WikiHeaderV2.initDelayed;    }); }

var trolls = ['Pecoes']; $(function {    if (!$('#WikiaArticleComments').length) return;    $('head').append( '<style type="text/css">' + '.bubble-head { display: inline-block; top: -20px; left: 50px; } ' + ' '   );

$('.SpeechBubble') .filter(function {        return -1 < trolls.indexOf($(this).attr('data-user'));    }) .find('.speech-bubble-message') .addClass('NavFrame collapsed') .prepend(' ') .find('.article-comm-text') .addClass('NavContent'); });