User:Duckysmokton/monobook.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
The accompanying .css page for this skin can be added at User:Duckysmokton/monobook.css. |
- Report page listing warnings and errors.
function Insere_Liens_Menus (nom_boite, liens, href_pre, href_post, format_pre, format_post)
{
var a = document.getElementById(nom_boite);
if (a)
{
var b = a.getElementsByTagName("ul");
if(b.length > 0)
{
for (var i=0;i<liens.length;i+=2) {
b[0].innerHTML += '<li>'+href_pre+liens[i+1]+href_post+format_pre+liens[i]+format_post+'</a>'
}
}
}
}
function Insere_Liens_UserBox (liens)
{
for (var i=0;i<liens.length;i+=3) {
var b = document.getElementById(liens[i]);
if(b) b.innerHTML += ' <small><a href="'+liens[i+2]+'"><font color="#9DC2FF">'+liens[i+1]+'</font></a></small>'
}
}
function menu()
{
// ----- Boîtes de navigation
var liens_nav =
new Array('Une page au hasard', 'http://commons.wikipedia.org/wiki/Special:RandomPage')
Insere_Liens_Menus ("p-navigation", liens_nav,
'<a class="external text" href="', '" rel=nofollow>',
'<i><font color="#E97451">', '</font></i>');
//----- user box
var liens_ub =
new Array ('pt-watchlist', '(fr)',
'http://fr.wikipedia.org/wiki/Special:Watchlist',
'pt-watchlist', '(en)',
'http://en.wikipedia.org/wiki/Special:Watchlist',
'pt-preferences', '(monobook)',
'http://commons.wikipedia.org/wiki/User:Duckysmokton/monobook.js')
Insere_Liens_UserBox (liens_ub)
}
$(menu);