MediaWiki:Gadget-oouiDemo.js

From Sea of Thieves Wiki
Jump to navigation Jump to search
In other languages: Deutsch • English • Español • Français • Português • 中文
Note: After saving, 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: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
// Title of the demo page, including the namespace.
var demoPageName = "Sea of Thieves Wiki:OOUI demo";

// Because the ResourceLoader refuses to load scripts that use ES6 features,
// the code of the gadget is on the following page and is loaded separately here.
var codePageName = "MediaWiki:Gadget-oouiDemo/core.js";

if (mw.config.get('wgPageName') === demoPageName.replace(/ /g, '_')) {
	mw.loader.load(mw.config.get('wgScript') + '?' + $.param({ title: codePageName, action: 'raw', ctype: 'text/javascript' }));
}