User:Shells-shells/common.js

From Wikisource
Revision as of 05:11, 30 May 2022 by Shells-shells (talk | contribs) (implement better programming practice)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Note: After saving, changes may not occur immediately. Click here to learn how to bypass your browser's cache.
  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Cmd-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (Cmd-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Clear the cache in Tools → Preferences

For details and instructions about other browsers, see Wikipedia:Bypass your cache.

$.when( mw.loader.using( 'mediawiki.util' ), $.ready ).then( function () {
	const title = mw.config.get( 'wgPageName' );
	mw.util.addPortletLink(
		'p-tb', /* portletId */
		'https://en.wikisource.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 */
	)
} );