User:KurwaAntics/global.js

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

/* ********** Menu ********** */ var contextMenuHTML = ' \ \ Develop\ Personal CSS\ Personal JS\ Global CSS\ <a href="http://community.wikia.com/wiki/User:KurwaAntics/global.js">Global JS</a>\ </li><a href="/wiki/MediaWiki:Wikia.css">Site-wide CSS</a>\ </li><a href="/wiki/MediaWiki:Common.js">Site-wide JS</a>\ </li><a href="/wiki/MediaWiki:ImportJS">Script imports</a>\ </li><a href="/wiki/Special:JSPages">Review status</a>\ </li><a href="/wiki/User:KurwaAntics/sandbox">Sandbox</a>\ </li><a href="#" onclick="location.reload(true);">Bypass cache</a>\ </li></ul>\ </li>';

$('.toolbar .tools').prepend(contextMenuHTML); /* window.wgEnableLightboxExt = false; $('.image-thumbnail:not(.link-internal):not(.link-external)').on('click',function{   var x = $(this);    var y = x.find('img').attr('data-image-name');    $('body').prepend('<div class="image-viewer" style="position: fixed; z-index: 5000102; top:0; left:0; width:100%; height: 100%;"><div style="background: #222; color: white; font-size: 18px; font-weight: bold; padding: 8px 8px 8px 16px; line-height: 34px;">'+ y +'<a class="wds-is-squished wds-button" style="float:right" onclick="CloseImageViewer">✕</a><a class="wds-is-squished wds-button" style="float:right; margin-right: 8px;" href="'+x.attr('href')+'">See full size image</a><a class="wds-is-squished wds-button" style="float:right; margin-right: 8px;" href="/wiki/File:'+y+'">More details</a> <div onclick="SeeFullSizeImage" style="width: 100%; height: calc(100% - 43px); background-image: url('+ x.attr('href') +'); background-size: contain; background-color: black; background-repeat: no-repeat; background-position: 50% 50%;">  '); $('html').css('overflow','hidden'); return false; }); function CloseImageViewer {   $('.image-viewer').remove;    $('html').css('overflow',''); }