Jump to content

User:Dane/QuickLinks.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dane (talk | contribs) at 21:12, 7 October 2017 (Add ACC Status). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* This script will add items to the toolbar for quick access to commonly used things */

/* $( document ).ready( function() {
  mw.util.addPortletLink(
    'p-personal',
    mw.util.wikiGetlink( 'Wikipedia:Dashboard' ),
    'Dashboard',
    'pt-dashboard',
    'View the Wikipedia Dashboard ',
    null,
    '#pt-preferences'
  );
}); */
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Wikipedia:Village pump/Proposals', "Village pump");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Special:MyPage/Toolbox', "Toolbox");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Special:MyPage/CSD log', "CSD log");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Wikipedia:Requested moves#Backlog', "Requested moves");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Wikipedia:Articles for deletion/Today', "Articles for deletion");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Special:RandomInCategory/Pending AfC submissions', "Random AFC Draft");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Special:PendingChanges', "Pending changes");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Special:NewPagesFeed', "New pages feed");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Wikipedia:Articles for creation/Redirects', "Redirects for creation");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/User:Music1201/Things to do', "Things to do");
mw.util.addPortletLink('p-navigation', 'http://ticket.wikimedia.org', "OTRS");

if (typeof(userACC) === 'undefined'){ var userACC = mw.config.get( 'wgUserName' ).replace(" ", "_"); }
$.ajax({
	url: '//accounts.wmflabs.org/api.php?action=status',
	dataType: 'xml',
	success: function(ACCstatus) {
		var requests = parseInt($(ACCstatus).find('status').attr('open'), 10);

			mw.util.addPortletLink('p-navigation', '//accounts.wmflabs.org/acc.php?tplUsername=' + userACC, requests + ' requested accounts!', 'p-acc', 'Go to the Account Creation Interface');
		
	}
});