Jump to content

User:Phd0/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
<!-- ONGLETS -->
      function addLoadEvent(func) 
      {
         if (window.addEventListener) 
             window.addEventListener("load", func, false);
         else if (window.attachEvent) 
             window.attachEvent("onload", func);
      }
 
      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><a href="http://fr.wikipedia.org/wiki/user:phd0">fr</a>|<a href="http://wiki.riteme.site/wiki/user:phd0">en</a></li>'
          }
        }
      }
 
      addLoadEvent(nouvelOnglet);
 
 
<!-- LIENS GAUCHE/BOITE PERSO -->
      function addLoadEvent(func) 
      {
         if (window.addEventListener) {
             window.addEventListener("load", func, false);
         } else if (window.attachEvent) {
             window.attachEvent("onload", func);
         }
      }
 
      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://wiki.riteme.site/wiki/User:Phd0/monobook.js">Monobook.js</a></li>'
          + '     <li><a href="http://wiki.riteme.site/wiki/User:Phd0/monobook.css">Monobook.css</a></li>'
          + '   </ul>'
          + ' </div>'
          + '</div> ';
        }
      }
      addLoadEvent(nouvelleBoite);