« Utilisateur:Thibaut120094/deln.js » : différence entre les versions
Contenu supprimé Contenu ajouté
copie de Utilisateur:0x010C/deln.js |
Annulation des modifications 7043083 de Thibaut120094 (discussion) |
||
Ligne 3 :
Retire les sauts de lignes parasites et autres machins générés par l'OCR
*/
$.typo2 = {
todo: [],
$.typo2.todo.push(fonction);
if (namespace % 2 == 1 || $.inArray(namespace, [ 4, 8 ]) != -1) {
for (var i = 0; i < $.typo2.todo.length; ++i) {
txt = $.typo2.todo[i](txt);
},
};
$(function() {
//typo
$.typo2.add(function(str) {
return $.trim(str);
$.when(
▲if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1
).then(function() {
▲ && mw.config.get( 'wgNamespaceNumber' ) % 2 !== 1
window.insert_button.editForm( {
'img_classic'
'img_advanced' : '//upload.wikimedia.org/wikipedia/commons/c/cb/Toolbaricon_regular_n.png',
▲ $( function() {
▲ mw.loader.using( [ 'ext.wikiEditor.toolbar' ], function() {
'img_id' : 'wsDeln',
'on_click' : $.typo2.exec
} );
} );
▲ var lineRemover = function() {
▲ var str = $( '#wpTextbox1' ).val();
▲ str = str.replace(/\n/g, "");
▲ str = str.replace(/- /g, "");
▲ str = str.replace(/¬/g, "");
▲ $( '#wpTextbox1' ).val( str.trim() );
▲ label: 'Retrait des sauts de ligne parasites',
▲ icon: '//upload.wikimedia.org/wikipedia/commons/c/cb/Toolbaricon_regular_n.png',
▲ }
▲ } );
▲ } );
▲ } );
}
|