Attention : Depuis MediaWiki 1.18 les pages se terminant avec l'extension .js ou .css sont interprétées comme des pages wiki ! En particulier les modèles (subst ou non) et les liens. Vous devez donc migrer le code source et effectuer vos changements en évitant ces éléments de syntaxe wiki (peu importe leurs emplacements dans le code source : commentaire, chaine) :

  • Double accolades ouvrantes (en particulier avec subst:) : séparer les deux accolades "{"+"{" du reste de la chaine
  • Double crochets ouvrants : même technique de séparation.
  • Signature (tildes ~ multiples) : même technique de séparation.

Note : après avoir enregistré vos préférences, vous devrez attendre que le serveur mette à jour la feuille de style globale avant de forcer le rechargement complet du cache de votre navigateur pour voir les changements.

  • Firefox / Safari : Maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou pressez Ctrl-F5 ou Ctrl-R (⌘-R sur un Mac) ;
  • Google Chrome : Appuyez sur Ctrl-Maj-R (⌘-Shift-R sur un Mac) ;
  • Internet Explorer : Maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5 ;
  • Konqueror : Cliquez sur Actualiser ou pressez F5 ;
  • Opera : Videz le cache dans Outils → Préférences.
/*<source lang="javascript" line>*/

/* Permet d'afficher un compte à rebours sur une page avec le modèle [[Modèle:Compte à rebours]] */
/* Plyd - 3 février 2009 */
function Rebours() {
  try {
   if (document.getElementById("rebours")) {
      destime = document.getElementById("rebours").title.split(";;");
      Maintenant = (new Date).getTime();
      Future = new Date(Date.UTC(destime[0], (destime[1]-1), destime[2], destime[3], destime[4], destime[5])).getTime();
      Diff = (Future-Maintenant);
      if (Diff < 0) {Diff = 0}
      TempsRestantJ = Math.floor(Diff/(24*3600*1000));
      TempsRestantH = Math.floor(Diff/(3600*1000)) % 24;
      TempsRestantM = Math.floor(Diff/(60*1000)) % 60;
      TempsRestantS = Math.floor(Diff/1000) % 60;
      TempsRestant = "" + destime[6] + " ";
      if (TempsRestantJ == 1) {
         TempsRestant = TempsRestant + TempsRestantJ + " jour ";
      } else if (TempsRestantJ > 1) {
         TempsRestant = TempsRestant + TempsRestantJ + " jours ";
      }
      TempsRestant = TempsRestant + TempsRestantH + " h " + TempsRestantM  + " min " + TempsRestantS + " s";
      document.getElementById("rebours").innerHTML = TempsRestant;
      setTimeout("Rebours()", 1000)
    }
  } catch (e) {}
}
addLoadEvent(Rebours);


document.write('<script type="text/javascript" src="' 
             + 'http://fr.wikipedia.org/w/index.php?title=Utilisateur:GôTô/objects.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
function setSummary(str)
{
	document.editform.wpSummary.value = str
}
 
function addToSummary(str)
{
	document.editform.wpSummary.value += " " + str
}
 
function setTextarea (str)
{
	document.editform.wpTextbox1.value = str
}
 
function getArticleName()
{
        var strOut = document.title
        // case search
        if (strOut == "Rechercher - Wikipédia")
                return document.getElementById("lsearchbox").value
        // case article being modified
        strOut = strOut.replace("modification de ", "").replace(" - Modifier", "")
 
        strOut = strOut.replace(" - Prévisualiser", "").replace(" - Wikipédia", "")
        return strOut
}
 
function insertAfter(parent, node, referenceNode)
{
	parent.insertBefore(node, referenceNode.nextSibling)
}
 
 
/* ========================================================================================= */
/* ========================================================================================= */
/* Boite à outils perso */
/* ========================================================================================= */
 
  function addLoadEvent(func) {
         if (window.addEventListener) {
             window.addEventListener("load", func, false);
         } else if (window.attachEvent) {
             window.attachEvent("onload", func);
         }
      }
 
function TodayDate() {
      m = new Array("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre");
      today = new Date();
      day = today.getDate();
      year = today.getYear();
 
      if (year < 2000)
           year = year + 1900;
 
      return (day + " " + m[today.getMonth()] + " " + year);
}
 
      function nouvelleBoite() {
        var l = document.getElementById("column-one");
        if (l) {
          l.innerHTML = l.innerHTML
          + '<div class="portlet" id="p-nbx">'
          + ' <h5>Boîte perso</h5>'
          + ' <div class="pBody">'
          + '   <ul>'
          + '     <li><a href="http://fr.wikipedia.org/w/index.php?title=Special:Recentchangeslinked&target=' + 'Portail:%C9lectricit%E9%20et%20%C9lectronique/Liste_des_articles&days=10&limit=200" >RC Portail élec</a></li>'
          + '     <li><a href="http://fr.wikipedia.org/wiki/' + 'Projet:Électricité et Électronique">Projet élec</a></li>'
          + '     <li><a href="http://fr.wikipedia.org/wiki/' + 'Utilisateur:Zedh/monobook.js">monobook.js</a></li>'
          + '     <li><a href="http://fr.wikipedia.org/wiki/' + 'Wikipédia:Le Bistro/' + TodayDate() + '">Le Bistrot J!</a></li>'
          + '     <li><a href="http://fr.wikipedia.org/wiki/' + 'WP:LB">Le Bistrot !</a></li>'
          + '     <li><a href="http://fr.wikipedia.org/wiki/' + 'Utilisateur:Zedh/Brouillon">Brouillon</a></li>'
          + '     <li><a href="http://fr.wikipedia.org/wiki/' + 'Aide:Exploration des espaces">Explo des espaces</a></li>'
          + '     <li><a href="http://fr.wikipedia.org/w/' + 'index.php?title=Special:Watchlist&hideMinor=1&hideOwn=1&hideBots=1">Liste de suivi light</a></li>'
          + '     <li><a href="http://fr.wikipedia.org/w/' + 'index.php?title=Special:Linksearch">Tracking url externes</a></li>'
          + '   </ul>'
          + ' </div>'
          + '</div> ';
        }
      }
      addLoadEvent(nouvelleBoite);
 
 
/* ========================================================================================= */
/* Aide au revert */
/* (src: en.wikipedia.org/wiki/Wikipedia_talk:WikiProject_User_scripts/Scripts/Revert_tools) */
/* ========================================================================================= */
 
//On diff pages this script replaces ''(Difference between revisions)''with
//different tools for reverting the edit and warning the user that made the edit.
//For instructions see talk page.
// Revert tools by Lorian
function getElementsByClass(searchClass,node,tag) {
  // Function from http://www.dustindiaz.com/getelementsbyclass/
  var classElements = new Array();
  if ( node == null )
    node = document;
  if ( tag == null )
    tag = '*';
  var els = node.getElementsByTagName(tag);
  var elsLen = els.length;
  var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
  for (i = 0, j = 0; i < elsLen; i++) {
    if ( pattern.test(els[i].className) ) {
      classElements[j] = els[i];
      j++;
    }
  }
  return classElements;
}
 
// _GET code from NoGray JS Library http://www.nogray.com/new_site/
var _GET = new Array();
var _uri = location.href;
 
var _temp_get_arr = _uri.substring(_uri.indexOf('?')+1, _uri.length).split("&");
 
var _temp_get_arr_1 = new Array();
 
for(_get_arr_i=0; _get_arr_i<_temp_get_arr.length; _get_arr_i++){
  _temp_get_arr_1 = _temp_get_arr[_get_arr_i].split("=");
  _GET[decodeURI(_temp_get_arr_1[0])] = decodeURI(_temp_get_arr_1[1]);
}
 
delete _uri; delete _temp_get_arr; delete _temp_get_arr_1;
 
function getMessage (where, user1, user2) {
  var message = prompt ('What message would you like to leave?', '');
  window.location = 'http://fr.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&'+where+'=2&user1='+user1+'&user2='+user2+'&message='+message;
}
 
$(function (){
  if (location.href.match(/diff=/)) {
    // Get username of submitter
    var user1 = getElementsByClass('diff-otitle',null,'td'); user1 = user1[0].getElementsByTagName('a')[2].innerHTML;
    var user2 = getElementsByClass('diff-ntitle',null,'td'); user2 = user2[0].getElementsByTagName('a')[2].innerHTML;
    // Get real oldid due to possible problems on the url oldid ..
    var temp = getElementsByClass('diff-otitle',null,'td');
    temp = temp[0].getElementsByTagName('a')[0].href;
    _GET['oldid'] = temp.substring(temp.indexOf('oldid=')+6, temp.length);
    delete temp;
    if (user2=="défaire") { user2 = getElementsByClass('diff-ntitle',null,'td'); user2 = user2[0].getElementsByTagName('a')[3].innerHTML; }
    document.getElementById('contentSub').innerHTML = '(<a href="http://fr.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&revert=1&user1='+user1+'&user2='+user2+'">Revert</a> / <a href="javascript:var message = getMessage(\'revert\', \''+user1+'\', \''+user2+'\');">Message</a>) (<a href="http://fr.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&vandalism=1&user1='+user1+'&user2='+user2+'">Vandalisme</a> / <a href="javascript:var message = getMessage(\'vandalism\', \''+user1+'\', \''+user2+'\');">Message</a>) (<a href="http://fr.wikipedia.org/wiki/Wikipédia:Modèles/Espace Discussion Utilisateur">Avertissement:</a> <a href="http://fr.wikipedia.org/w/index.php?title=User_talk:' + user2 + '&action=edit&section=new&warn=1">Coucou</a> / <a href="http://fr.wikipedia.org/w/index.php?title=User_talk:' + user2 + '&action=edit&section=new&warn=2">Test 0</a> / <a href="http://fr.wikipedia.org/w/index.php?title=User_talk:' + user2 + '&action=edit&section=new&warn=3">Test 1</a> / <a href="http://fr.wikipedia.org/w/index.php?title=User_talk:' + user2 + '&action=edit&section=new&warn=4&article_name=' + _GET['title'] + '">Vandale IP</a> / <a href="http://fr.wikipedia.org/w/index.php?title=User_talk:' + user2 + '&action=edit&section=new&warn=5&article_name=' + _GET['title'] + '">Spammeur</a> / <a href="http://fr.wikipedia.org/w/index.php?title=User_talk:' + user2 + '&action=edit&section=new&warn=6&article_name=' + _GET['title'] +  '">Inf Boite résumé</a>)';
  } else if (location.href.match(/revert=1/)) {
    document.getElementById('wpSummary').value = 'Révocation des modifications de [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] et retour à la version de [[Special:Contributions/'+_GET['user1']+'|'+_GET['user1']+']]';
    document.getElementById('editform').submit();
  } else if (location.href.match(/revert=2/)) {
    document.getElementById('wpSummary').value = 'Révocation des modifications de [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] et retour à la version de [[Special:Contributions/'+_GET['user1']+'|'+_GET['user1']+']] ('+_GET['message']+')';
    document.getElementById('editform').submit();
  } else if (location.href.match(/vandalism=1/)) {
    document.getElementById('wpSummary').value = 'Révocation du vandalisme de [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] et retour à la version de [[Special:Contributions/'+_GET['user1']+'|'+_GET['user1']+']]';
    document.getElementById('editform').submit();
  } else if (location.href.match(/vandalism=2/)) {
    document.getElementById('wpSummary').value = 'Révocation du vandalisme de [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] et retour à la version de [[Special:Contributions/'+_GET['user1']+'|'+_GET['user1']+']] ('+_GET['message']+')';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=1/)) {
    document.getElementById('wpSummary').value = 'Coucou';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:coucou}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=2/)) {
    document.getElementById('wpSummary').value = 'Avertissement Vandale';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:Test 0}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=3/)) {
    document.getElementById('wpSummary').value = 'Avertissement Vandale';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:Test 1}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=4/)) {
    document.getElementById('wpSummary').value = 'Avertissement Vandale';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:Vandalisme IP|' + location.href.replace(/^.*article_name=([^&]*).*$/, '$1') + '}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=5/)) {
    document.getElementById('wpSummary').value = 'Avertissement Vandale';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:bienvenue spammeur|' + location.href.replace(/^.*article_name=([^&]*).*$/, '$1') + '}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=6/)) {
    document.getElementById('wpSummary').value = 'Information IP';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:Motivation modif|Page=' + location.href.replace(/^.*article_name=([^&]*).*$/, '$1') + '}} ~~'+'~~';
    document.getElementById('editform').submit();
  }
});

 
// LiveRC
 
loadJs('Utilisateur:Savant-fou/LiveRC.js');
 
// Wikipédia:Historiques en couleur
 
document.write('<script type="text/javascript" src="' 
            + 'http://fr.wikipedia.org/w/index.php?title=Utilisateur:Dake/monobook.js/deluxehistory.js' 
            + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
 
// Alexandria
 
//<!-- ======================================================================================== -->
//<!-- Alexandria IS DISTRIBUTED "AS IS". NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. -->
//<!-- YOU USE AT YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF -->
//<!-- PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE. -->
//<!-- ======================================================================================== -->
 
//<!-- **************************************************************************************** -->
//<!-- Alexandria's parameters for Webmasters -->
//<!-- Download and place on your site the "alexandria.wm.js" to update your special terms. -->
//<!-- Customization is only possible for registered customers. -->
//<!-- **************************************************************************************** -->
document.write('<script type="text/javascript" language="JavaScript1.2" src="/alexandria-memodata/alexandria.wm.fr.js"></script>');
 
//<!-- **************************************************************************************** -->
//<!-- Alexandria's engine -->
//<!-- Copy the lines below in each page you want Alexandria's functionalities to be available. -->
//<!-- **************************************************************************************** -->
document.write('<script type="text/javascript" language="JavaScript1.2" src="http://www.sensagent.com/alexandria/scripts/alexandria.main.js"></script>');
document.write('<link rel=StyleSheet href="http://www.sensagent.com/alexandria/css/alexandria.window.css" type="text/css">');
 
//<!-- ======================================================================================== -->

/*</source>*/