« MediaWiki:Gadget-ReplaceTextLayer.js » : différence entre les versions
Contenu supprimé Contenu ajouté
mAucun résumé des modifications |
migration vers le wiki editor |
||
Ligne 1 :
▲( function ( mw, $, tl ) {
'use strict';
return $.inArray('ext.gadget.' + name, modules) != -1;
}
var $text_box1 = $('#wpTextbox1');
if (!$text_box1.length) {
Ligne 26 ⟶ 16 :
var modules = mw.loader.getModuleNames();
if (
window.mise_en_page.exec('auto_create');
}
if (
$.typo.exec();
}
}
$.ajax({
url: mw.util.wikiScript( 'api' ),
Ligne 59 ⟶ 49 :
}
if (text) {
}
}
});
}
tl.onClick = function() {▼
var datas = mw.config.get('wgTitle').split('/');▼
tl.getTextLayer(datas[0], datas[1]);▼
'img_classic' : '//upload.wikimedia.org/wikisource/fr/1/1d/TL.png',▼
'tooltip' : 'Remplace le texte de la Page: actuel par la couche texte',▼
} );▼
if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit']) !== -1 && mw.config.get('wgCanonicalNamespace') == 'Page') {
mw.loader.using('ext.wikiEditor', function() {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'advanced',
group: 'format',
tools: {
'textLayer': {
type: 'button',
action: {
type: 'callback',
execute: function() {
▲ var datas = mw.config.get('wgTitle').split('/');
}
}
}
}
});
});
}
}( mediaWiki, jQuery
|