MediaWiki:Gadget-ProveIt.js: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
Hidayatsrf (bicara | kontrib) k terjemahkan ringkasan suntingan |
|||
Baris 1:
/**
* ProveIt is a powerful
*
*
* The gadget
* but here are a few * and
*/
// Only load on appropriate namespaces
var namespace = mw.config.get( 'wgNamespaceNumber' );
if ( namespace === 0 || namespace === 2
// 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-templates': [ // These templates should have their TemplateData defined▼
▲ mw.config.set({
'proveit-summary': 'Referensi disunting menggunakan ProveIt', // Automatic edit summary
▲ 'proveit-templates': [ // These templates should have their TemplateData defined
'
'
'
'
'
]▼
});
// 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' );▼
▲ ]
}
} );
▲ // 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' );
}
}
|