Utente:Lenore/monobook.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Lenore (discussione | contributi)
prova
Lenore (discussione | contributi)
non funziona
Riga 26:
 
var commentoIntro = '/* */ ';
 
// Variabili per "nascondi/mostra HotCat"
 
function hideCatLinks () {
var hotCatLinks = document.getElementsByClassName('hotcatlink');
for (i=0; i<hotCatLinks.length-1; i++) {
hotCatLinks[i].setAttribute('style', 'display:none');
}
document.getElementById('showhideCatLinksButton').setAttribute('onclick', 'showCatLinks();');
}
 
function showCatLinks () {
var hotCatLinks = document.getElementsByClassName('hotcatlink');
for (i=0; i<hotCatLinks.length-1; i++) {
hotCatLinks[i].setAttribute('style', 'display:inline');
}
document.getElementById('showhideCatLinksButton').setAttribute('onclick', 'hideCatLinks();');
}
 
showhideCatLinksImage = 'http://upload.wikimedia.org/wikipedia/commons/e/ee/Gartoon-Advance-directory.png';
 
showhideCatLinksButton = "<div style=\"position:fixed; background-color:transparent; top:10px; left:10px; z-index:1000\"><a id=\"showhideCatLinksButton\"><img src=" + showhideCatLinksImage + " width=\"40\" height=\"40\" alt=\"Nascondi HotCat\"></img></a></div>";
 
addOnloadHook (function () {
Line 182 ⟶ 160:
 
importScript('Utente:Lenore/HotCat.js');
 
addOnloadHook (function () {
 
// HotCat: mette un pulsante per abilitarlo e disbilitarlo
 
document.body.innerHTML = document.body.innerHTML + showhideCatLinksButton;
hideCatLinks;
 
});
 
// ———————————————————————————————————————————————————————————————————————————————————————