User:Lucas Werkmeister/namescript.js

From Wikidata
Jump to navigation Jump to search

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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
if (typeof window === 'object' &&
	typeof document === 'object' &&
	typeof mw === 'object' &&
	typeof $ === 'function') {
	const sourceUser = 'Lucas_Werkmeister'; // **IF YOU COPY THIS USER SCRIPT TO YOUR OWN PAGE, REPLACE THIS WITH YOUR OWN USER NAME**
	$.get('https://www.wikidata.org/w/index.php?title=User:' + sourceUser + '/namescript-browser.js&action=raw&ctype=text/javascript');
} else if (typeof require === 'function') {
	require('./namescript-cli.js');
} else {
	console.error('Could not detect environment!');
}