🇮🇷 Iran Proxy | https://www.wikipedia.org/wiki/MediaWiki:Gadget-ProveIt.js
Jump to content

MediaWiki:Gadget-ProveIt.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/**
 * ProveIt is a reference manager for Wikipedia and any other MediaWiki wiki
 * Documentation: https://www.mediawiki.org/wiki/ProveIt
 * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-Global-ProveIt.js
 */
function loadProveIt() {
	mw.config.set( {

		// Citation templates (without namespace)
		'proveit-templates': [
			'Citation',
			'Cite arXiv',
			'Cite AV media',
			'Cite AV media notes',
			'Cite book',
			'Cite bioRxiv',
			'Cite conference',
			'Cite comic',
			'Cite encyclopedia',
			'Cite episode',
			'Cite Hansard',
			'Cite Instagram',
			'Cite interview',
			'Cite journal',
			'Cite magazine',
			'Cite mailing list',
			'Cite map',
			'Cite Metacritic',
			'Cite news',
			'Cite newsgroup',
			'Cite newspaper The Times',
			'Cite ODNB',
			'Cite paper',
			'Cite podcast',
			'Cite press release',
			'Cite report',
			'Cite Rotten Tomatoes',
			'Cite serial',
			'Cite sign',
			'Cite speech',
			'Cite techreport',
			'Cite thesis',
			'Cite tweet',
			'Cite video',
			'Cite video game',
			'Cite ssrn',
			'Cite wikisource',
			'Cite web',
			'Cite Q',
			'R',
			'Sfn',
			'Sfnm'
		],

		// Citation templates that shouldn't go inside <ref> tags
		'proveit-templates-noref': [ 'R', 'Sfn', 'Sfnm' ],

		// Preferred date format, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options
		'proveit-date-format': { year: 'numeric', month: 'long', day: 'numeric' },

		// Revision tag defined at Special:Tags
		'proveit-tag': 'ProveIt edit',

		// Automatic edit summary
		'proveit-summary': 'Reference edited with [[Wikipedia:ProveIt|ProveIt]]',
	} );

	// Load from the central, global version at MediaWiki.org
	mw.loader.load( '//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-ProveIt' );
}

// Only load when editing
mw.hook( 'wikipage.editform' ).add( editForm => window.ProveIt || loadProveIt() );
mw.hook( 've.newTarget' ).add( target => target.constructor.static.name === 'article' && target.on( 'surfaceReady', loadProveIt ) );