Utent:Robin Hood~lmowiki/monobook.js

De Wikipedia

Nota: dopo che t'hee publicad, te podarisset havegh de netà la chèsc del programma de navigazzion per vedé i cambiament.

  • Firefox / Safari: schiscia sgiò el boton di leter grande intanta che te fee clich in su Ricarica, opur schiscia Ctrl insema a F5 opur Ctrl e R (⌘-R on a Mac)
  • Google Chrome: schiscia Ctrl̹ e insema a Shift e R (⌘ e Shift e R cont el Mac)
  • Internet Explorer / Edge: schiscia sgiò Ctrl intanta che te clichet in su Aggiorna, o schiscia sgiò insema Ctrl e F5
  • Opera: Schischia sgiò Ctrl-F5.
function addLoadEvent(func) {
  if (window.addEventListener) {
    window.addEventListener("load", func, false);
  }
  else if (window.attachEvent) {
         window.attachEvent("onload", func);
       }
}

// AJOUTE DEUX ONGLETS MONOBOOK

function ajoutOngletJS() {
  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/User:Robin_Hood/monobook.js">'
        + 'js</a></li>';
      }
    }
}

function ajoutOngletCSS() {
  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/User:Robin_Hood/monobook.css">'
        + 'css</a></li>';
      }
    }
}

// AJOUTE UN ONGLET STRUCTURE

function ajoutOngletStructure() {
  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/User:Robin_Hood/Structure">'
        + 'Structure</a></li>';
      }
    }
}

// AJOUTE LES LIENS DANS LA BOÎTE DE NAVIGATION

function ajoutLiens() {
  var a = document.getElementById("p-navigation");
    if (a) {
      b = a.getElementsByTagName("ul");
      if(b.length > 0) {
        b[0].innerHTML = b[0].innerHTML 
        + '<li><a style="display: inline" title="Meta:Sorting order" '
        +        'href="http://meta.wikimedia.org/wiki/Interwiki_sorting_order">'
        +              'Ordre des interwikis</a></li>'
        + '<li><a style="display: inline" title="Wikipedia:Grott" '
        +        'href="/w/index.php?title=Wikipedia:Grott&action=purge">'
        +              'Le Bistro</a></li>'
        + '<li><a style="display: inline" title="Wikipedia:Ambassada" '
        +        'href="/wiki/Wikipedia:Ambassada">'
        +              'Ambassade</a></li>'
        + '<li><a style="display: inline" title="Suivis" '
        +        'href="http://lmo.wikipedia.org/w/index.php?title=Special:Watchlist&days=0">'
        +              'Tous les suivis</a>'
        +     '<a style="display: inline" title="Suivis" '
        +        'href="http://lmo.wikipedia.org/w/index.php?title=Special:Watchlist&days=3">'
        +              '3 jours</a>'
        +     '<a style="display: inline" title="Suivis" '
        +        'href="http://lmo.wikipedia.org/w/index.php?title=Special:Watchlist&days=1">'
        +              '1 jour</a></li>'
      }
    }
}

addLoadEvent(ajoutLiens);
if ( wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk" ) {
  addLoadEvent(ajoutOngletJS);
  addLoadEvent(ajoutOngletStructure);
  addLoadEvent(ajoutOngletCSS);
}

// AJOUTE LES LIENS DANS LA BOÎTE À OUTILS

$(function () {
 
  if ( wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk" ) {
    url = wgServer 
          + "/w/index.php?title=Special:Log&user=" 
          + wgTitle.split("/")[0];
  } 
  else if ( wgCanonicalNamespace == "Special" ) {
               return;
       } 
       else {
         url = wgServer 
               + "/w/index.php?title=Special:Log&page=" 
               + wgPageName;
       }
 
mw.util.addPortletLink("p-tb", "http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user=Robin+Hood&dbname=lmowiki_p", "Compteur d'éditions", "ca-editcount");
mw.util.addPortletLink("p-cactions", url, "Journal", "pt-logs");
});