User:Curiouscrab/common.js

// 01:38, March 22, 2016 (UTC)

if(skin == 'monobook') { if(window.location.search == '' && [-1].indexOf(wgNamespaceNumber) < 0) { //window.location.search = '?useskin=wikia'; }

mw.util.addPortletLink('p-community','/wiki/User:SpikeToronto/talk','SpikeToronto','spiketoronto','Get help from SpikeToronto','s');

$('#pt-mytalk')[0].getElementsByTagName('a')[0].innerHTML='my talk'; $('#pt-mytalk')[0].getElementsByTagName('a')[0].href='/wiki/User:Curiouscrab/talk'; }

// duplicate images function dupcheck { for(i=0; i<10; i++) { window.open($('#mw-dupimages a')[i] + '?act=check'); } }

if(window.location.search == '?act=check') { if($('.mw-imagepage-duplicates li').length > 0) { window.location.search = '?action=delete'; } }

// make cleaning out Special:UnusedCategories easier var offset = 0;

if(wgPageName=="Special:UnusedCategories" && window.location.search=="") { window.location.search='?limit=500'; }

if(wgPageName=="Special:UnusedCategories") { $('.new').remove; for(i=0;i<document.getElementsByClassName('special')[0].getElementsByTagName('a').length;i++) { document.getElementsByClassName('special')[0].getElementsByTagName('a')[i].search='?action=history'; } for(i=0; i<50; i++) { //setInterval(function{ window.open(document.getElementsByClassName('special')[0].getElementsByTagName('a')[i].href); //$('.special li:nth-child(1)').remove; //},10000); } }

if(wgAction == 'history') { if($('.mw-history-histlinks').length) { if($('.mw-history-histlinks a').length) { if($('.history-user a:nth-child(1)').html=='Cblair91' || $('.history-user a:nth-child(1)').html=='HottieBottie') { //window.location.href=document.getElementsByClassName('mw-history-histlinks')[0].getElementsByTagName('a')[0].href + '&action=edit'; } } }

if($('.comment a').length) { if($('.comment a')[$('.comment a').length-1].innerHTML=='Special:WantedCategories') { $.get('/api.php?action=query&prop=info&titles=' + wgPageName + '&intoken=delete&format=json',function(data){ $.post('/api.php?action=delete&title=' + wgPageName + '&token=' + encodeURIComponent(data.query.pages[Object.keys(data.query.pages)[0]].deletetoken) + '&reason=Unused%20category:%20mass%20created%20category', function { window.close; }); }); } else { window.close; } } else { window.close; } }