User:Novem Linguae/Scripts/Portlets.js

// /* Put my code/notes for adding menu items, tabs, etc. here

https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.util-method-addPortletLink https://en.wikipedia.org/wiki/Wikipedia:User_scripts/Guide#Portlets_%28add_custom_menus_and_tabs%29

Top p-personal - The links at the very top right of the page. "personal" stands for "personal tools". p-views - The tabs at the top of the page, below p-personal, near the favorite page star tab. These tabs never collapse. Not recommended, this area doesn't have much room, it is best to use p-cactions. p-cactions - The tabs at the top of the page, below p-personal. Consider giving these the class "collapsible", so that they fold into the "More" tab when the page shrinks. "cactions" stands for "content actions". p-search Left p-logo p-navigation p-interaction - Has the title "Contribute". p-tb - Has the title "Tools". TB stands for toolbox. p-coll-print_export - Has the title "Print/export". p-lang - Has the title "Languages". mw.util.addPortletLink(	portletID,	linkURL,	linkText,	ID, (optional) - suggest using a prefix such as ca-, pt-, n-, or t-	tooltip, (optional)	accessKey, (optional) - set to null if you don't need it	nextNode, (optional) - element that this will be added in front of

$( document ).ready( function {	mw.util.addPortletLink( 'p-logo', mw.util.getUrl( 'Special:MyPage/CSD log' ), 'Test', 'l-csd', 'View CSD log', null, '#pt-preferences' ); });

//