User:Henrique Diaz/monobook.js
From Wikipedia, the free encyclopedia
If a message on your talk page led you here, please be wary of who left it. Code that you insert on this page could contain malicious content capable of compromising your account. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. If this is a .js page, the code will be executed when previewing the page.
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
// Script from [[User:Lupin/popupsdev.js]] //document.write('<script type="text/javascript" src="' // + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popupsdev.js' // + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // [[User:Lupin/popups.js]] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popupsdev.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); /******************************************/ /* Amélioration de la boîte de navigation */ /* Auteur : Seb35 */ /* Bistro d'aujourd'hui par Teofilo */ /******************************************/ var isOpen = new Array(); var tempo; function navigationBox_main() { a = document.getElementById('p-navigation').getElementsByTagName('ul')[0]; m = new Array('janvier','février','mars','avril','mai','juin','juillet','août','septembre','octobre','novembre','décembre'); today = new Date(); jjmoisaa = today.getDate() + '_' + m[today.getMonth()] + '_' + (today.getYear() + 1900); jjmm = today.getDate() + '/' + (today.getMonth()+1); //Tableau perso à remplir var pages = new Array( 'Général', new Array('/wiki/Wikipédia:Le_Bistro/' + jjmoisaa, 'Le Bistro ' + jjmm, '/wiki/Wikipédia:Vandalisme_en_cours', 'WP:-(', '/wiki/Wikipédia:Requête_aux_administrateurs', 'WP:RA' ), 'Maintenance', new Array('/w/index.php?title=Special:Recentchanges&hideliu=1&limit=200', 'RC IP', '/wiki/Wikipédia:Pages_à_fusionner', 'WP:PàF', '/wiki/Wikipédia:Pages_à_supprimer', 'WP:PàS' ) ); //Liens perso hors menu déroulant a.innerHTML = a.innerHTML + '<li><a href="/wiki/Special:Newpages" title="Special:Newpages">Nouvelles pages</a></li>'; //----------------------------// //Ne pas modifier ce qui suit // //----------------------------// for(i = 0; i<(pages.length)/2; i++) { isOpen[i] = 0; temp = ''; for(j=0; j<(pages[2*i+1].length)/2; j++) temp += '<li><a href="' + pages[2*i+1][2*j] + '">' + pages[2*i+1][2*j+1] + '</a></li>'; a.innerHTML = a.innerHTML + '<li>' + '<a style="cursor:hand;" onMouseOver="if(!isOpen[' + i + ']) tempo = setTimeout(toggleMenu, 300, ' + (i+1) + ');" ' + 'onMouseOut="clearTimeout(tempo);" onClick="clearTimeout(tempo); toggleMenu(' + (i+1) + ');" title="' + pages[2*i] + '">' + pages[2*i] + '</a>' + '</li>' + '<div id="MenuToggle' + (i+1) + '" style="display:none;">' + temp + '</div>'; } } /************************************************/ /* Ouvre un menu créé par la fonction ci-dessus */ /************************************************/ function toggleMenu(v) { if(isOpen[v-1] == 0) { document.getElementById('MenuToggle' + v).style.display = 'block'; isOpen[v-1] = 1; } else if(isOpen[v-1] == 1) { document.getElementById('MenuToggle' + v).style.display = 'none'; isOpen[v-1] = 0; } } addOnloadHook(navigationBox_main);