« MediaWiki:Group-sysop.js » : différence entre les versions
Contenu supprimé Contenu ajouté
Adaptation du code d'User:Orlodrim pour étre compatible avec 1) ResourceLoader 2) Les outils de masqueur de modifications |
m Coding style de MediaWiki |
||
Ligne 44 :
}
/
if ( mw.config.get(
var hdrBC = $( '#bodyContent' );
if ( hdrBC.length == 0 ) {
hdrBC = $( '#article' ); }
if (hdrBC.length == 0) hdrBC = $('#mw_contentholder');▼
var firstCheckbox = checkboxes.filter(':first');▼
}
▲ var firstCheckbox = checkboxes.filter( ':first' );
// Les masqueurs de modifications disposent d'une checkbox en plus, dans ce cas, prendre la suivante
if ( firstCheckbox.attr( 'name' ) == 'wpUnsuppress' ) {
firstCheckbox = checkboxes.filter( ':eq(1)' ); }
var hdrList = firstCheckbox.closest( 'ul' );
var hdrBt = $( '<input type="button" value="Afficher/masquer les versions sélectionnées" style="float:right">' );
hdrBt.click( function() {
▲ var page = hdrBC.find('input[name=target]').attr('value');
var
var
if ( typeof( name ) == 'undefined' && name.substr( 0, 2 ) != 'ts' ) {
return '';
}
return '&ids[' + name.substr(2) + ']=1';
}).get().join( '' );
window.location = mw.config.get( 'wgScript' ) +
+ encodeURIComponent(
+ "&type=archive&target="+ encodeURIComponent( page ) + param;
});
hdrList.before( hdrBt );
}
} ) } );
|