Jump to content

User:Begoon/addVectorLinks.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Begoon (talk | contribs) at 03:26, 13 September 2016 (.). 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.
//add some links to Vector interface

//Alternative sandbox link - don't want &action=edit
////////////////////////////////////////////////////
//mw.util.addPortletLink('p-personal','/w/index.php?title=Special:MyPage/sandbox','Sandbox','pt-mysandbox', 'Go to your sandbox', null, '#pt-preferences' );

//Alternative watchlist link - don't want bots
////////////////////////////////////////////////////
//remove old link
var WlElem = document.getElementById("pt-watchlist");
WlElem.parentNode.removeChild(WlElem);
//add new link
mw.util.addPortletLink('p-personal','/w/index.php?title=Special:Watchlist&days=7&hidebots=1','Watchlist','pt-watchlist', 'View your watchlist', null, '#pt-mycontris' );

//Alternative contributions link - show 250
////////////////////////////////////////////////////
//remove old link
var WlElem = document.getElementById("pt-mycontris");
WlElem.parentNode.removeChild(WlElem);
//add new link
mw.util.addPortletLink('p-personal','/w/index.php?title=Special:Contributions/Begoon&offset=&limit=250', 'Contributions','pt-mycontris', 'View your contributions', null, '#pt-logout' );

// add Pending Changes link to Interaction 
////////////////////////////////////////// 
jQuery( function( $ ) {
var followNode = document.getElementById("n-recentchanges").nextSibling;
mw.util.addPortletLink('p-interaction', 'http://en.wikipedia.org/wiki/Special:OldReviewedPages',
               'Pending changes', 'n-pendingchanges', 'The list of changes not yet Reviewed','',followNode);
});

//add Edit Requests link to Interaction
/////////////////////////////////////// 
jQuery( function( $ ) {
var followNode = document.getElementById("n-pendingchanges").nextSibling;
mw.util.addPortletLink('p-interaction', 'http://en.wikipedia.org/wiki/Category:Wikipedia_semi-protected_edit_requests',
               'Edit requests', 'n-semiprotected', 'Semi-protected edit requests','',followNode);
});

//add Preferences link to end of Twinkle menu
/////////////////////////////////////////////
jQuery( function( $ ) {
setTimeout(function(){
mw.util.addPortletLink('p-twinkle', 'http://en.wikipedia.org/wiki/Wikipedia:Twinkle/Preferences', 'Settings', 'tw-editprefs', 'Edit your Twinkle settings', null, '');
//alert ('done');
}, 7500);
});