मीडियाविकि:Gadget-ProveIt.js: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
नया वर्जन लागू कइल गइल
Update to latest
लाइन 1:
/**
* ProveIt is a powerful GUIreference toolmanager tofor find, edit, add and cite references in any MediaWiki wikiWikipedia
* Full documentationDocumentation at https://commons.wikimedia.org/wiki/Help:Gadget-ProveIt
*
* The gadget itselfcode is loaded directly from Wikimedia Commons,
* but here are a few conditionsconditionals to minimize requests
* and a fewsome configuration options specific to this wiki
*/
 
// Only load on appropriate namespaces
var namespace = mw.config.get( 'wgNamespaceNumber' );
if ( namespace === 0 || namespace === 2 || namespace === 118 ) {
 
// Only load when editing
Line 19 ⟶ 20:
if ( contentModel === 'wikitext' ) {
 
// Only load with the classic wikitext editors, not the new one
// Set the wiki-specific options (all options are optional and can be set to null)
var textbox = document.getElementById( 'wpTextbox1' );
mw.config.set({
if ( textbox ) {
'proveit-tag': 'ProveIt edit', // Revision tag created at Special:Tags
 
'proveit-summary': 'Reference edited with [[Wikipedia:ProveIt|ProveIt]]', // Edit summary automatically added by ProveIt
// SetConfigure the wiki-specific optionsgadget (all options are optional and can be set to null)
'proveit-templates': [ // These templates should have their TemplateData defined
mw.config.set({
'Template:Citation',
'proveit-tag': 'ProveIt edit', // Revision tag created at Special:Tags
'Template:Cite AV media',
'proveit-summary': 'Reference edited with [[Wikipedia:ProveIt|ProveIt]]', // EditAutomatic edit summary automatically added by ProveIt
'Template:Cite book',
'proveit-templates': [ // These templates should have their TemplateData defined
'Template:Cite encyclopedia',
'Template:Cite episodeCitation',
'Template:Cite journalAV media',
'Template:Cite magazinebook',
'Template:Cite newsencyclopedia',
'Template:Cite paperepisode',
'Template:Cite press releasejournal',
'Template:Cite signmagazine',
'Template:Cite thesisnews',
'Template:Cite tweetpaper',
'Template:Cite videopress release',
'Template:Cite websign',
'Template:Cite AV mediathesis',
'Template:Cite booktweet',
'Template:Cite encyclopediavideo',
'Template:CitationCite web',
]
});
// Load the dependencies
mw.loader.using([
'jquery.cookie',
'jquery.textSelection',
'jquery.ui.draggable'
]).then( function () {
 
// Load the latest code directly from Commons
mw.loader.load( '//commons.wikimedia.org/w/indexload.php?titlemodules=MediaWiki:Gadget-ext.gadget.ProveIt.js&action=raw&ctypeonly=text/javascriptscripts' );
mw.loader.load( '//commons.wikimedia.org/w/indexload.php?titlemodules=MediaWiki:Gadget-ext.gadget.ProveIt.css&action=raw&ctypeonly=text/cssstyles', 'text/css' );
});
}
}