User:Jafeluv/vector.js

// // Direct link to upload page mw.util.addPortletLink('p-tb', '//en.wikipedia.org/w/index.php?title=Special:Upload', 'Upload file (direct)', 't-direct', 'Go directly to the upload page', '', document.getElementById('t-upload')); jQuery( document ).ready( function( $ ) {

var pageTitle = document.getElementById('firstHeading').getElementsByTagName('span')[0].innerHTML;

// Add sandbox link to navigation bar. mw.util.addPortletLink('p-navigation', '//en.wikipedia.org/wiki/User:Jafeluv/Sandbox', 'Sandbox', 'n-sandbox', 'Show user sandbox', , ); // Add inspection toolbox; adapted from User:Smith609/toolbox.js. var toolboxElement = document.getElementById("p-tb"); var inspectionElement= toolboxElement.cloneNode(true); inspectionElement.id="p-insp"; inspectionElement.innerHTML = " Inspection tools  "; toolboxElement.parentNode.insertBefore(inspectionElement, toolboxElement.nextSibling); // Add traffic stats link to inspection toolbox; from User:Smith609/toolbox.js. var now = new Date; var month = now.getMonth; var thisMonth = (now.getDay > 6); if (thisMonth) month++;

var year = now.getFullYear; if (month == 0) { var month=12; --year; } else { var month = ((month <10)?'0':'') + month; } mw.util.addPortletLink("p-insp", "http://stats.grok.se/en/" + year + month + "/"+mw.config.get('wgPageName'), 'Traffic stats', '', "Traffic to this page " + (thisMonth?'this':'last') + " month"); // Add Dablinks tool to inspection toolbox. mw.util.addPortletLink('p-insp', 'http://toolserver.org/~dispenser/cgi-bin/dablinks.py?page=' + mw.config.get('wgPageName'), 'Dablinks', , 'Check disambiguation links', ); // Add Checklinks tool to inspection toolbox. mw.util.addPortletLink('p-insp', 'http://toolserver.org/~dispenser/cgi-bin/webchecklinks.py?page=' + mw.config.get('wgPageName'), 'Checklinks', , 'Check external links', );

// Make edits to redirects minor by default. if(pageTitle.match(/Editing /) && document.editform.wpTextbox1.value.match(/^#redirect/i)) { // Skip the redirect if it's currently at RfD. if(document.editform.wpTextbox1.value.toLowerCase.indexOf('') == -1) { if(document.editform.wpMinoredit) { document.editform.wpMinoredit.checked = true; }   }  } }); //