Utilisateur:Bestter/monobook.js

Un article de Wikipédia, l'encyclopédie libre.

Note : Après avoir publié la page, vous devrez forcer son rechargement pour voir les changements : Mozilla / Konqueror / Firefox : Shift-Ctrl-R, Internet Explorer / Opera : Ctrl-F5, Safari : Cmd-R.

      function nouvelOnglet() 
      {
        var a = document.getElementById("p-cactions");
        if (a) 
        {
          b = a.getElementsByTagName("ul");
          if(b.length > 0)
          {
            b[0].innerHTML = b[0].innerHTML
            + '<li id="ca-nstab-user">'
            + '<a href="/wiki/Utilisateur:Bestter/Zone de jeux">'
            + 'Zone de jeux</a></li>';
          }
        }
      }
 
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/wiki/Wikipédia:Le_Bistro">Le Bistro</a></li>'
          + '     <li><a href="http://fr.wikipedia.org/wiki/Wikipédia:Oracle">Oracle</a></li>'          
          + '     <li><a href="http://fr.wikipedia.org/wiki/User:Bestter/monobook.js">Monobook.js</a></li>'
          + '     <li><a href="http://fr.wikipedia.org/wiki/Utilisateur:EDUCA33E/LiveRC">liveRC</a></li>'
          + '   </ul>'
          + ' </div>'
          + '</div> ';
        }
      }
 
function addEditSection0() {
  ta['ca-edit-0'] = ['', 'Edit the zeroth section of this page'];
  if (!document.getElementById) return;
  x = document.getElementById('ca-edit');
  if(!x) return;
  y = document.createElement('LI');
  y.id = 'ca-edit-0';
  if (x.className == 'selected') {
    if (/&action=edit&section=0$/.test(window.location.href)) {
      x.className = 'istalk';
      y.className = 'selected';
    } else {
      x.className = 'selected istalk';
    }
  } else if (x.className == 'selected istalk') {
    if (/&action=edit&section=0$/.test(window.location.href)) {
      x.className = 'istalk';
      y.className = 'selected istalk';
    } else {
      y.className = 'istalk';
    }
  } else {
    y.className = x.className;
    x.className = 'istalk';
  }
  z = document.createElement('A');
  if (x.children) {
    z.href = x.children[0].href + '&section=0';
    z.appendChild(document.createTextNode('0'));
    y.appendChild(z);
    document.getElementById('p-cactions').children[1].insertBefore(y,x.nextSibling);
  } else {
    z.href = x.childNodes[0].href + '&section=0';
    z.appendChild(document.createTextNode('0'));
    y.appendChild(z);
    document.getElementById('p-cactions').childNodes[3].insertBefore(y,x.nextSibling);
  }
}
 
//if (document.title.indexOf("modification ") == -1) {
//  addOnloadHook(addEditSection0);
//}
 
 
addOnloadHook(nouvelleBoite);
 
addOnloadHook(nouvelOnglet);
 
loadJs('Utilisateur:EDUCA33E/LiveRC.js');