Utilisateur:MALPAS/monobook.js
Note : après avoir enregistré la page, vous devrez forcer le rechargement complet du cache de votre navigateur pour voir les changements.
Mozilla / Firefox / Konqueror / Safari : maintenez la touche Majuscule (Shift) en cliquant sur le bouton Actualiser (Reload) ou pressez Maj-Ctrl-R (Cmd-R sur Apple Mac) ;
Firefox (sur GNU/Linux) / Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.importScript('MediaWiki:Gadget-Popups.js');
function googleOnglet() {
var a = document.getElementById("p-cactions");
if (a)
{
var pageName = document.title.replace(" - Wikipédia", "");
b = a.getElementsByTagName("ul");
if(b.length > 0)
{
b[0].innerHTML = b[0].innerHTML
+ '<li id="ca-nstab-user"><font style="color: rose; font-weight: bold; padding-left: 0.3em">recherche</font> '
+ '<a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=site%3Afr.wiki.x.io+' + pageName + '&btnG=Search">'
+ 'wp-fr</a>'
+ '<a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=site%3Awikipedia.org+' + pageName + '&btnG=Search">'
+ 'wp</a>'
+ '<a href="http://www.google.fr/search?num=20&hl=fr&safe=off&q=' + pageName + '&btnG=Search&meta=lr%3Dlang_fr">'
+ 'web-fr</a>'
+ '<a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=' + pageName + '&btnG=Search">'
+ 'web</a>'
+ '</li>';
}
}
}
$(googleOnglet);
function PaletteOutils()
{
var a = document.getElementById("p-tb");
if (a)
{
b = a.getElementsByTagName("ul");
if(b.length > 0)
{
b[0].innerHTML = b[0].innerHTML
+ '<li><span id="n-bistro" title="http://commons.wikimedia.org/wiki/Special:Upload">'
+ '<a href="http://commons.wikimedia.org/wiki/Special:Upload">'
+ 'Importer une image ou un son sur Commons</a></span> </li>'
}
}
}
$(PaletteOutils);
function testcursor() { document.getElementById("searchInput").focus(); }
$(testcursor);
function OngletPurge() {
var a = document.getElementById("p-cactions");
if (a)
{
var pageName = document.title.replace(" - Wikipédia", "");
b = a.getElementsByTagName("ul");
if(b.length > 0)
{
b[0].innerHTML = b[0].innerHTML
+ '<li id="ca-nstab-user">'
+ '<a href="/w/index.php?action=purge&title=' + pageName + '">purger</a>'
+ '</li>';
}
}
}
// Onglet Purge
$(OngletPurge);
// Personalisation de la boite de navigation ainsi que de la boite utilisateur (haut de page)
function OptimizedNavig()
{
// nav box
var a = document.getElementById("p-navigation");
if (a)
{
b = a.getElementsByTagName("ul");
if(b.length > 0)
{
var startUrl = '/w/index.php?title='
var endUrl = '&action=purge'
// liste des URLs
var urls = new Array()
urls[0] = 'Wikipédia:Le Bistro/' + TodayDate()
urls[1] = 'Special:Newpages'
var labels = new Array()
labels[0] = 'Bistro'
labels[1] = 'New'
for (var i=0;i<urls.length;i+=2) {
tableHTML = '<table valign="top" cellspacing="0" cellpadding="0">'
tableHTML += '<tr>'
tableHTML += '<li><td><a href="' + startUrl + urls[i] + endUrl + '">' + labels[i] + ' | </a></td>'
tableHTML += '<td><a href="' + startUrl + urls[i+1] + endUrl + '">' + labels[i+1] + '</a></td></li>'
tableHTML += '</tr>'
tableHTML += '</table>'
b[0].innerHTML = b[0].innerHTML + tableHTML
}
}
}
}
$(OptimizedNavig);
function TodayDate()
{
var m = new Array("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre")
var today = new Date()
var day = today.getDate()
var year = today.getYear()
if (year < 2000)
year += 1900
return (day + " " + m[today.getMonth()] + " " + year)
}
//</nowiki></pre>
function boiteEcouter() {
var l = document.getElementById("column-one");
var pageName = document.title.replace(" - Wikipédia", "");
if (l) {
l.innerHTML = l.innerHTML
+ '<div class="portlet" id="p-nbx">'
+ ' <h5>Écouter cette page</h5>'
+ ' <div class="pBody">'
+ ' <ul>'
+ ' <li><a href="http://prt-i61.fernuni-hagen.de/~bischoff/radiopedia/radiopedia_listen_windowsmedia_fr.cgi?search=' + pageName + '">Windows Media Player</a></li>'
+ ' <li><a href="http://prt-i61.fernuni-hagen.de/~bischoff/radiopedia/radiopedia_listen_fr.cgi?search=' + pageName + '"></a></li>'
+ ' <li><a href="http://prt-i61.fernuni-hagen.de/~bischoff/radiopedia/radiopedia_listen_flash_fr.cgi?search=' + pageName + '"></a></li>'
+ ' </ul>'
+ ' </div>'
+ '</div> ';
}
}
$(boiteEcouter);