User:Equazcion/common.js

// Load jquery importScript('User:Equazcion/jquery.js');

//Display IP info on IP contributions pages importScript('User:Equazcion/ipinfo.js');

//History research tools importScript('User:Equazcion/LiveDiffLink.js');

//Contrib count var contribCount = $('li:has(a.mw-changeslist-date)'); var contribNum = contribCount.length; var contribUL = $('li:has(a.mw-changeslist-date):first').parent('ul'); contribUL.before(' Total edits displayed: ' + contribNum + ' ');

//Display hidden block option setTimeout(function{  $('.mw-htmlform-field-HTMLCheckField:has(input#mw-input-wpAutoBlock)').show; }, 500);

// 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('');

// 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; $('.curse-stripe').remove;

setTimeout(function{   $('.show-ads').remove;    //$('iframe').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');