User:Le Deluge/vector.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin can be added at User:Le Deluge/vector.css. |
mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3AAndyZ%2Fpeerreviewer.js&action=raw&ctype=text/javascript'); // [[User:AndyZ/peerreviewer.js]]
// if you are using the "expand citations" gadget, then you'll want to install toolbox2.js instead or the links will be duplicated
importScript("User:Smith609/citations.js");
function addToToolbox() {
if (mw.config.get('wgCanonicalNamespace') != "Special") {
var pTb = document.getElementById("p-tb");
if( !pTb ) return;
var pStats = pTb.cloneNode(true);
pStats.id="p-stats";
pStats.innerHTML = "<label id='p-interaction-label' class='vector-menu-heading '><span class='vector-menu-heading-label'>My links</span></label><div class='vector-menu-content'></div>";
pTb.parentNode.insertBefore(pStats, pTb.nextSibling);
/* var now = new Date();
var month = now.getMonth();
var year = now.getFullYear();
var thisMonth = (now.getDay() > 6);
if (thisMonth) month++;
if (month == 0) {
month = 12;
year--;
} else month = ((month <10)?'0':'') + month; */
mw.util.addPortletLink("p-stats", "https://pageviews.toolforge.org/?project=en.wikipedia.org&platform=all-access&agent=user&redirects=0&range=latest-30&pages=" + encodeURI(mw.config.get('wgPageName')), 'Traffic stats', '', "Traffic to this page in the last month");
mw.util.addPortletLink("p-stats", "https://en.wikipedia.org/w/index.php?action=edit&preview=yes&summary=Created%20with%20the%20help%20of%20Template:Copycat§ion=0&preload=Template:Copycat%20preload&title=" + encodeURI(mw.config.get('wgPageName')), 'Copycat', '', "Try to clone a sibling of a YYYY category");
}
}
if( $.inArray( mw.config.get( 'skin' ), [ "myskin" , "simple" , "monobook" , "modern", "chick" , "vector" ] ) !== -1 ) {
$( addToToolbox );
}