User:Robin Hood~enwiki/monobook.js

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 + '' + '' + 'js'; }   } }

function ajoutOngletCSS { var a = document.getElementById("p-cactions"); if (a) { b = a.getElementsByTagName("ul"); if(b.length > 0) { b[0].innerHTML = b[0].innerHTML + '' + '' + 'css'; }   } }

// 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 + '' + '' + 'Structure'; }   } }

// 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 + '' +             'Interwiki sorting order' + '<li><a style="display: inline" title="Wikipedia:Village pump" ' +       'href="/w/index.php?title=Wikipedia:Village_pump&action=purge">' +             'Village pump</a></li>' + '<li><a style="display: inline" title="Wikipedia:Embassy" ' +       'href="/w/index.php?title=Wikipedia:Embassy&action=purge">' +             'Embassy</a></li>' + '<li><a style="display: inline" title="Suivis" ' +       'href="http://en.wikipedia.org/w/wiki.phtml?title=Special:Watchlist&days=0">' +             'Complete watchlist</a>' +    '<a style="display: inline" title="Suivis" ' +       'href="http://en.wikipedia.org/w/wiki.phtml?title=Special:Watchlist&days=3">' +             '3 days</a>' +    '<a style="display: inline" title="Suivis" ' +       'href="http://en.wikipedia.org/w/wiki.phtml?title=Special:Watchlist&days=1">' +             '1 day</a></li>' }   } }

addLoadEvent(ajoutLiens); if ( wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk" ) { addLoadEvent(ajoutOngletStructure); addLoadEvent(ajoutOngletJS); 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=enwiki_p", "Edit count", "ca-editcount");  mw.util.addPortletLink("p-cactions", url, "Log", "pt-logs"); });

function addLoadEvent(func) { if (window.addEventListener) { window.addEventListener("load", func, false); } else if (window.attachEvent) { window.attachEvent("onload", func); } }