Difference between revisions of MediaWiki:Gadget-ProveIt.js

Jump to navigation Jump to search
(Created page with "/** * ProveIt is a powerful reference manager for Wikipedia * Documentation at https://commons.wikimedia.org/wiki/Help:Gadget-ProveIt * * This script sets the configuratio...")
 
No edit summary
Line 15: Line 15:
'Cite AV media',
'Cite AV media',
'Cite book',
'Cite book',
'Cite bioRxiv',
'Cite comic',
'Cite encyclopedia',
'Cite encyclopedia',
'Cite episode',
'Cite episode',
Line 26: Line 24:
'Cite press release',
'Cite press release',
'Cite report',
'Cite report',
'Cite sign',
'Cite speech',
'Cite speech',
'Cite thesis',
'Cite thesis',
'Cite tweet',
'Cite tweet',
'Cite video',
'Cite video game',
'Cite web',
'Cite web',
],
],

Revision as of 19:58, 24 May 2020

/**
 * ProveIt is a powerful reference manager for Wikipedia
 * Documentation at https://commons.wikimedia.org/wiki/Help:Gadget-ProveIt
 *
 * This script sets the configuration options specific to this wiki
 * and loads the gadget code from Wikimedia Commons
 */
function loadProveIt() {
	mw.config.set({
		'proveit-tag': 'ProveIt', // Revision tag defined at Special:Tags (optional)
		'proveit-summary': 'Reference edited with [[Commons:Help:Gadget-ProveIt|ProveIt]]', // Automatic edit summary (optional)
		'proveit-templates': [ // Citation templates (without namespace)
			'Citation',
			'Cite arXiv',
			'Cite AV media',
			'Cite book',
			'Cite encyclopedia',
			'Cite episode',
			'Cite interview',
			'Cite journal',
			'Cite magazine',
			'Cite news',
			'Cite paper',
			'Cite press release',
			'Cite report',
			'Cite speech',
			'Cite thesis',
			'Cite tweet',
			'Cite web',
		],
		'proveit-namespaces': [ // Supported namespaces (see https://www.mediawiki.org/wiki/Manual:Namespace_constants)
			0, // Main namespace
			2, // User namespace
		]
	});
	mw.loader.load( '//commons.wikimedia.org/w/load.php?modules=ext.gadget.ProveIt&only=scripts' );
	mw.loader.load( '//commons.wikimedia.org/w/load.php?modules=ext.gadget.ProveIt&only=styles', 'text/css' );
}

// Only load when editing
mw.hook( 'wikipage.editform' ).add( loadProveIt );
mw.hook( 've.activationComplete' ).add( loadProveIt );