User:Equazcion/common.js

// Load jquery mw.loader.load('//terraria.gamepedia.com/User:Equazcion/jquery.js&action=raw&ctype=text/javascript');

// Remove patrol links and tags $('.unpatrolled').remove; $('.patrollink').remove;

// In recent changes: var $pages = $('.mw-changeslist .special li'); $pages.each(function(index,value){   var $this = $(this);

// Add "check" link to user links, which opens contribs, deleted contribs, and block log var $userBlock = $this.find('.mw-usertoollinks a:last'); $userBlock.after(' | check'); var $check = $this.find('.check'); var $user = $this.find('.mw-userlink:last').text; $check.css('cursor','pointer'); $check.click(function{       window.open('http://terraria.gamepedia.com/Special:Contributions/' + $user);        window.open('http://terraria.gamepedia.com/Special:DeletedContributions/' + $user);        window.open('http://terraria.gamepedia.com/index.php?title=Special:Log/block&page=User%3A' + $user);    }); // Add delete links to new pages if ($this.find('.newpage').length > 0) { var $title = $this.find('.mw-title'); $title.after(' (delete)'); } });

// Always choose Vandalism as default delete reason $('#wpDeleteReasonList').val('Vandalism');

// Remove previous content from delete summary line and place below for optional pasting $deleteContent = $('#wpDeleteReasonRow #wpReason').val; $('#deleteconfirm').append(' '); $('#wpDeleteReasonRow #wpReason').val('');

//Display IP info on IP contributions pages if (typeof wgRelevantUserName !== 'undefined' && !isNaN(wgRelevantUserName.substr(0,1))){ var $contentSub = $('#contentSub'); $.get('http://ipinfo.io/' + wgRelevantUserName + '/json', {}, function(r1){       r1 = JSON.stringify(r1);        var obj = $.parseJSON(r1);        var ipInfoStyle = "float:right; border:1px solid rgb(47, 111, 171); padding:0 7px 5px 5px; margin:10px;";        $contentSub.after('IP info  ');        $ipInfo = $('.ipInfo');        $.each(obj, function(key, data){ if (key == 'ip') { data += ' (tor check) '} $ipInfo.append(' ' + key + ':  ' + data + '  '); });       $ipInfo.append(' ');    }); }

// Remove ads, promos, "social" features $('#p-sitePromos').remove; $('#p-socialProfiles').remove; $('#p-sharing').remove; $('.t-netbar-curseInfo').remove; $('#socialContainer').remove; $('#feedlinks').remove; $('.atfmrec').remove; $('.show-ads').remove; $('#siteNotice').remove; setTimeout(function{   $('.show-ads').remove; },500);

// Tweak header spacing $('#left-navigation').css('margin-top','1px'); $('#right-navigation').css('margin-top','1px'); $('#mw-head-base').css('margin-top','-7.4em'); $('#firstHeading').css('margin-bottom','0'); $('.mw-specialpage-summary').remove; $('#contentSub').css('margin-bottom','.5em');