MediaWiki:Gadget-ProveIt.js: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
k terjemahkan ringkasan suntingan
Baris 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
Baris 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)
$( function () {
mw.config.set({
var textbox = $( '#wpTextbox1' );
'proveit-tag': 'ProveIt edit', // Revision tag created at Special:Tags
if ( textbox.length ) {
'proveit-summary': 'Menyunting referensi menggunakan [[en:Wikipedia:ProveIt|ProveIt]]', // Edit summary automatically added by ProveIt
 
'proveit-templates': [ // These templates should have their TemplateData defined
// SetConfigure the wiki-specific optionsgadget (all options are optional and can be set to null)
'Template:Citation',
mw.config.set({
'Template:Cite AV media',
'proveit-tag': 'ProveItsuntingan editProveIt', // Revision tag created at Special:Tags
'Template:Cite book',
'proveit-summary': 'Referensi disunting menggunakan ProveIt', // Automatic edit summary
'Template:Cite encyclopedia',
'proveit-templates': [ // These templates should have their TemplateData defined
'Template:Cite episode',
'TemplateTemplat:Cite journalbook',
'TemplateTemplat:Cite magazineencyclopedia',
'TemplateTemplat:Cite newsjournal',
'TemplateTemplat:Cite paperreport',
'TemplateTemplat:Cite press releaseweb',
]
'Template:Cite sign',
});
'Template:Cite thesis',
 
'Template:Cite tweet',
// Load the latest code directly from Commons
'Template:Cite video',
mw.loader.load( '//commons.wikimedia.org/w/load.php?modules=ext.gadget.ProveIt&only=scripts' );
'Template:Cite web'
mw.loader.load( '//commons.wikimedia.org/w/load.php?modules=ext.gadget.ProveIt&only=styles', 'text/css' );
]
});
} );
// Load the latest code directly from Commons
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' );
}
}