« MediaWiki:Common.js » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 66 : | Ligne 66 : | ||
jQuery( CustomizeModificationsOfSidebar ); | jQuery( CustomizeModificationsOfSidebar ); | ||
<!-- Statcounter code for Simvol-Wiki | |||
https://wiki.simvol.org on Wikispaces --> | |||
<script type="text/javascript"> | |||
var sc_project=12828042; | |||
var sc_invisible=1; | |||
var sc_security="3105ac14"; | |||
</script> | |||
<script type="text/javascript" | |||
src="https://www.statcounter.com/counter/counter.js" | |||
async></script> | |||
<noscript><div class="statcounter"><a title="Web Analytics" | |||
href="https://statcounter.com/" target="_blank"><img | |||
class="statcounter" | |||
src="https://c.statcounter.com/12828042/0/3105ac14/1/" | |||
alt="Web Analytics" | |||
referrerPolicy="no-referrer-when-downgrade"></a></div></noscript> | |||
<!-- End of Statcounter Code --> |
Version du 3 mars 2023 à 12:15
/* Tout JavaScript présent ici sera exécuté par tous les utilisateurs à chaque chargement de page. */ function ModifySidebar( action, section, name, link ) { try { switch ( section ) { case 'languages': var target = 'p-lang'; break; case 'toolbox': var target = 'p-tb'; break; case 'navigation': var target = 'p-navigation'; break; default: var target = 'p-' + section; break; } if ( action == 'add' ) { var node = document.getElementById( target ) .getElementsByTagName( 'div' )[0] .getElementsByTagName( 'ul' )[0]; var aNode = document.createElement( 'a' ); var liNode = document.createElement( 'li' ); aNode.appendChild( document.createTextNode( name ) ); aNode.setAttribute( 'href', link ); liNode.appendChild( aNode ); liNode.className = 'plainlinks'; node.appendChild( liNode ); } if ( action == 'remove' ) { var list = document.getElementById( target ) .getElementsByTagName( 'div' )[0] .getElementsByTagName( 'ul' )[0]; var listelements = list.getElementsByTagName( 'li' ); for ( var i = 0; i < listelements.length; i++ ) { if ( listelements[i].getElementsByTagName( 'a' )[0].innerHTML == name || listelements[i].getElementsByTagName( 'a' )[0].href == link ) { list.removeChild( listelements[i] ); } } } } catch( e ) { // ignorer simplement ce qui vient d'arriver return; } } function CustomizeModificationsOfSidebar() { // ajouter [[Special:CategoryTree|Special:CategoryTree]] à la boîte à outils // ModifySidebar( 'add', 'toolbox', 'CategoryTree', 'https://en.wikipedia.org/wiki/Special:CategoryTree' ); // supprimer [[Special:Upload|Special:Upload]] de la boîte à outils ModifySidebar( 'remove', 'toolbox', 'Upload file', 'https://en.wikipedia.org/wiki/Special:Upload' ); } jQuery( CustomizeModificationsOfSidebar ); <!-- Statcounter code for Simvol-Wiki https://wiki.simvol.org on Wikispaces --> <script type="text/javascript"> var sc_project=12828042; var sc_invisible=1; var sc_security="3105ac14"; </script> <script type="text/javascript" src="https://www.statcounter.com/counter/counter.js" async></script> <noscript><div class="statcounter"><a title="Web Analytics" href="https://statcounter.com/" target="_blank"><img class="statcounter" src="https://c.statcounter.com/12828042/0/3105ac14/1/" alt="Web Analytics" referrerPolicy="no-referrer-when-downgrade"></a></div></noscript> <!-- End of Statcounter Code -->