I would like a tool in the sidebar's "Tools" section that takes readers to Special:PrefixIndex/FULLPAGENAME
where FULLPAGENAME
is replaced with the current page's full name. For example, say I was on the page Module:Citation/CS1
then I would like a tool in the sidebar called Subpages
that takes me to Special:PrefixIndex/Module:Citation/CS1
. I have seen (the mediawiki sidebar manual) and I added:
function CustomizeModificationsOfSidebar() {
// Adds PrefixIndex
var page = mw.config.get( 'wgPageName' );
ModifySidebar( 'add', 'toolbox', 'Subpages', "http://127.0.0.1/mediawiki/index.php/Special:PrefixIndex/"'page' );
}
jQuery( CustomizeModificationsOfSidebar );
to the page MediaWiki:Common.js
. This gave the JavaScript error: Error: Expected ')' and instead saw 'page'.
that prevented me from saving the page.