User:Davidgothberg/vector.js: Difference between revisions

Content deleted Content added
Configuring the navigation popups like I had them in Monobook.
Copy from my monobook.js: Add some links in the navigation and toolbox menus on the left side of the page.
Line 17:
/* New messages history */
importScript( "User:Davidgothberg/newmessageshistory.js" );
 
 
// Add some links in the navigation and toolbox menus
// on the left side of the page.
addOnloadHook( function() {
// Add an "Extended search" link to the "navigation" menu".
addPortletLink( 'p-navigation', wgArticlePath.replace("$1", "Special:Search"), 'Extended search', 'pt-search', 'More search options' );
// Add "Secure server view" or "Normal server view" link.
if( wgServer == "http://en.wikipedia.org" ) {
addPortletLink( "p-tb",
"https://secure.wikimedia.org/wikipedia/en/wiki/" + wgPageName,
"Secure server view", "pt-securepage", "Secure server view" );
}
else if( wgServer == "https://secure.wikimedia.org" ) {
addPortletLink( "p-tb",
"http://en.wikipedia.org/wiki/" + wgPageName,
"Normal server view", "pt-securepage", "Normal server view" );
}
// List subpages of the current page.
addPortletLink( "p-tb", wgScript + "?title=Special:PrefixIndex/" + wgPageName + "/",
"Subpages", "pt-subpages", "Subpages" );
// List template transclusion count of the current template page.
if ( wgNamespaceNumber == 10 || wgNamespaceNumber == 11 ) {
addPortletLink( "p-tb",
"http://toolserver.org/~jarry/templatecount/index.php?lang=en&name="
+ wgTitle + "#bottom",
"Template transclusions", "pt-transclusion-count", "Transclusion count" );
}
} );