User:CalendulaAsteraceae/common.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// First wait for mediawiki.util to load, and the page to be ready.
$.when(mw.loader.using('mediawiki.util'), $.ready).then(function () {
const title = mw.config.get('wgPageName');
// Add link to toolbar.
mw.util.addPortletLink(
'p-tb', /* portletId */
'https://meta.wikimedia.org/wiki/Special:PrefixIndex/' + title, /* href */
'Pages with prefix', /* text */
't-prefixindex', /* id */
'A list of all wiki pages with this prefix [⌃⌥i]', /* tooltip */
'i' /* accesskey */
/* '#t-recentchangeslinked' nextnode */
);
});