User:KurwaAntics/global.js

/* ********** Load scripts ********** */ importArticles({   type: "script",    articles: [        "u:dev:Wikimarks/code.js",        "u:dev:View Source/code.js",        "u:dev:DisplayClock/code.js",        "u:dev:QuickDiff/code.js",        "u:dev:EditIntroButton/code.js",        "u:dev:ConsistentModules/code.js",        "u:dev:PortableCSSPad/code.js"    ] });

$('.toolbar .tools').append(' \  \ Edit scripts\ \ Review status\ Script imports\ Site-wide JS\ <a href="/wiki/MediaWiki:Wikia.css">Site-wide CSS</a></li>\ <a href="http://community.wikia.com/wiki/User:KurwaAntics/global.js">Global JS</a></li>\ <a href="http://community.wikia.com/wiki/User:KurwaAntics/global.css">Global CSS</a></li>\ <a href="/wiki/User:KurwaAntics/common.js">Personal JS</a></li>\ <a href="/wiki/User:KurwaAntics/wikia.css">Personal CSS</a></li>\ </ul></li>\ <a onclick="testmode" style="cursor:pointer">Test mode</a></li>\ <a onclick="newmodules" style="cursor:pointer">Modules</a></li>\ <a onclick="dismissallmsg" style="cursor:pointer">Dismiss all messages</a></li>');

function testmode{ $.nirvana.postJson('ContentReviewApi', 'enableTestMode', {       editToken: mw.user.tokens.get('editToken')    }); location.reload(true); }

function newmodules { function execute { $('#WikiaRail .module').removeClass('module').addClass('rail-module'    ); }   var clas = $('#WikiaRail').attr('class'); if(clas && clas.split(/\s+/).indexOf('loaded') === -1) { $('#WikiaRail').on('afterLoad.rail', execute); } else { execute; } }

function dismissallmsg{ $('.close.wikia-chiclet-button').each(function{$(this).trigger('click');}); }