Utente:+KillerQueen+/monobook.js
Questa pagina definisce alcuni parametri di aspetto e comportamento generale di tutte le pagine. Per personalizzarli vedi Aiuto:Stile utente.
Nota: dopo aver salvato è necessario pulire la cache del proprio browser per vedere i cambiamenti, e comunque qualche minuto di preghiera non guasta. Per Mozilla / Firefox / Safari: fare clic su Ricarica tenendo premuto il tasto delle maiuscole, oppure premere Ctrl-F5 o Ctrl-R (Command-R su Mac); per Chrome premere Ctrl-Shift-R (Command-Shift-R su un Mac); per Konqueror: premere il pulsante Ricarica o il tasto F5; per Opera può essere necessario svuotare completamente la cache dal menu Strumenti → Preferenze; per Internet Explorer: mantenere premuto il tasto Ctrl mentre si preme il pulsante Aggiorna o premere Ctrl-F5.
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/0/0c/Button_Chuck.png",
"speedTip": "Cancellazione immediata (USARE CON CAUTELA!)",
"tagOpen": "{{Cancellazione|motivo=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Inserire qui il motivo"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images4.wikia.nocookie.net/nonciclopedia/images/3/33/Sguardone.png",
"speedTip": "Immagine da rinominare ",
"tagOpen": "{{Nomedimmerda|{{subst:7g}" + "}|motivo=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "",
"speedTip": " Categoria immagini",
"tagOpen": "[[Categoria:Immagini ",
"tagClose": "]]",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images3.wikia.nocookie.net/nonciclopedia/images/6/6c/Button_restauro.png",
"speedTip": "Articolo da sistemare",
"tagOpen": "{{Restauro|motivo=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Inserire qui la descrizione"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/0/0a/Button_sad.png",
"speedTip": "Poco umoristico",
"tagOpen": "{{Accusa|accusa=" + "APU" + "|firma=~~" + "~~}" + "}\n\n",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/d/d6/E%27fiamme.png",
"speedTip": "Formattazione",
"tagOpen": "{{Formattazione|note=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Inserire qui cosa fare"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/f/f9/Button_box.png",
"speedTip": "Box",
"tagOpen": '{| class="expansion" width="100%" align="center" style="background: #FFFFFF; color: #000000; border: 1px solid #000000; text-align: left; margin-bottom: 0px; margin-top: 0px;"\n| style="padding-right: 4px; padding-left: 4px;" |\n',
"tagClose": "\n|}\n",
"sampleText": "Inserire qui il testo interno"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/central/images/1/12/Button_gallery.png",
"speedTip": "Galleria di immagini",
"tagOpen": "\n<gallery>\n",
"tagClose": "\n</gallery>",
"sampleText": "Immagine:Example.jpg|Caption1\nImmagine:Example.jpg|Caption2"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png",
"speedTip": "Barrato",
"tagOpen": "<s>",
"tagClose": "</s>",
"sampleText": "Barrato"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/8/80/Button_upper_letter.png",
"speedTip": "Apice",
"tagOpen": "<sup>",
"tagClose": "</sup>",
"sampleText": "Apice"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/5/58/Button_small.png",
"speedTip": "Piccolo",
"tagOpen": "<small>",
"tagClose": "</small>",
"sampleText": "Piccolo"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/5/56/Button_big.png",
"speedTip": "Grande",
"tagOpen": "<big>",
"tagClose": "</big>",
"sampleText": "Grande"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/6/60/Button_insert_table.png",
"speedTip": "Tabella",
"tagOpen": '{| class="wikitable"\n|-\n',
"tagClose": "\n|}",
"sampleText": "! header 1\n! header 2\n! header 3\n|-\n| row 1, cell 1\n| row 1, cell 2\n| row 1, cell 3\n|-\n| row 2, cell 1\n| row 2, cell 2\n| row 2, cell 3"};
}
annullaMorphCommon = 1;
/* Hook that enables collapsing objects.
* Added 11/5/2007 by WhiteMystery (misterioblanco@gmail.com)
* on Encyclopedia Dramatica, stolen by Sua Zanzità Zazy
* Uses publicly available code in one function, where noted. */
addOnloadHook(createToggleLinks);
/* Function that toggles collapsing objects.
* Added 11/5/2007 by WhiteMystery (misterioblanco@gmail.com)
* on Encyclopedia Dramatica, stolen by Sua Zanzità Zazy
* Uses publicly available code in one function, where noted. */
function toggleCollapse(objToToggle, collapseText, expandText) {
var linkText = "";
var targetObject = returnObjById(objToToggle);
if ( targetObject ) {
if ( targetObject.style.display == "none" ) {
targetObject.style.display = "block";
linkText = collapseText;
}
else {
targetObject.style.display = "none";
linkText = expandText;
}
var toggleLink = document.createElement("span");
toggleLink.appendChild(document.createTextNode(linkText));
toggleLink.setAttribute("onclick", "javascript:toggleCollapse('" + objToToggle + "','" + collapseText + "','" + expandText + "')");
toggleLink.setAttribute('onmouseover', 'style.textDecoration="underline"');
toggleLink.setAttribute('onmouseout', 'style.textDecoration="none"');
toggleLink.setAttribute("style", "color:blue;");
returnObjById(objToToggle + "Link").innerHTML = "";
returnObjById(objToToggle + "Link").appendChild(toggleLink);
}
}
/* Functions that performs the morph operation.
* Added 11/5/2007 by WhiteMystery (misterioblanco@gmail.com)
* on Encyclopedia Dramatica, stolen by Sua Zanzità Zazy
* Uses publicly available code in one function, where noted. */
function performMorph(targetID, targetNumber) {
var counter = 1;
while ( returnObjById(targetID + "Content" + counter) ) {
if ( counter == targetNumber )
returnObjById(targetID + "Content" + counter).style.display = "block";
else
returnObjById(targetID + "Content" + counter).style.display = "none";
counter++;
}
returnObjById(targetID + "Master").innerHTML = targetNumber;
}
function morphForward(targetID) {
var nextPane = parseInt(returnObjById(targetID + "Master").innerHTML) + 1;
if ( returnObjById(targetID + "Content" + nextPane) )
performMorph(targetID, nextPane);
else
performMorph(targetID, "1");
}
function morphBackward(targetID) {
var prevPane = parseInt(returnObjById(targetID + "Master").innerHTML) - 1;
if ( prevPane > 0 )
performMorph(targetID, prevPane);
else {
var maxIndex = 1;
while ( returnObjById(targetID + "Content" + maxIndex) )
maxIndex++;
performMorph(targetID, maxIndex - 1);
}
}
/* Function that creates ED's collapsing objects and toggle links.
* Added 11/5/2007 by WhiteMystery (misterioblanco@gmail.com)
* on Encyclopedia Dramatica, stolen by Sua Zanzità Zazy
* Uses publicly available code in one function, where noted.
*
* Updated: 1/11/2008 by WhiteMystery to add new Morphing Objects
* functionality. */
function createToggleLinks() {
var spanCollection = document.getElementsByTagName("span");
for ( i = 0; i < spanCollection.length; i++ ) {
if ( spanCollection[i].className == "toggleLink" ) {
var spanID = spanCollection[i].getAttribute("id");
var targetID = spanID.substr(0, spanID.length - 4);
var collapseText = returnObjById(targetID + "CollapseText").innerHTML;
var expandText = returnObjById(targetID + "ExpandText").innerHTML;
var initialState = returnObjById(targetID + "InitialState").innerHTML;
var toggleLink = document.createElement("span");
if ( initialState == "0" ) {
returnObjById(targetID).style.display = "none";
toggleLink.appendChild(document.createTextNode(expandText));
}
else {
returnObjById(targetID).style.display = "block";
toggleLink.appendChild(document.createTextNode(collapseText));
}
toggleLink.setAttribute("onclick", "javascript:toggleCollapse('" + targetID + "','" + collapseText + "','" + expandText + "')");
toggleLink.setAttribute('onmouseover', 'style.textDecoration="underline"');
toggleLink.setAttribute('onmouseout', 'style.textDecoration="none"');
toggleLink.setAttribute("style", "color:blue;");
spanCollection[i].appendChild(toggleLink);
}
else if ( spanCollection[i].className == "morphMaster" ) {
var spanID = spanCollection[i].getAttribute("id");
var targetID = spanID.substr(0, spanID.length - 6);
var counter = 1;
// Create forward and backward paging if the paging elements exist
if ( returnObjById(targetID + "LinkNext") && returnObjById(targetID + "LinkPrev") && returnObjById(targetID + "Content1") ) {
// Create the forward link
var nextLink = document.createElement("span");
nextLink.innerHTML = returnObjById(targetID + "LinkNext").innerHTML;
nextLink.setAttribute("onclick", "javascript:morphForward('" + targetID + "')");
nextLink.setAttribute('onmouseover', 'style.textDecoration="underline"');
nextLink.setAttribute('onmouseout', 'style.textDecoration="none"');
nextLink.setAttribute("style", "color:blue;");
returnObjById(targetID + "LinkNext").innerHTML = "";
returnObjById(targetID + "LinkNext").appendChild(nextLink, 0);
// Create the backward link
var prevLink = document.createElement("span");
prevLink.innerHTML = returnObjById(targetID + "LinkPrev").innerHTML;
prevLink.setAttribute("onclick", "javascript:morphBackward('" + targetID + "')");
prevLink.setAttribute('onmouseover', 'style.textDecoration="underline"');
prevLink.setAttribute('onmouseout', 'style.textDecoration="none"');
prevLink.setAttribute("style", "color:blue;");
returnObjById(targetID + "LinkPrev").innerHTML = "";
returnObjById(targetID + "LinkPrev").appendChild(prevLink, 0);
// Initialize content panes
while ( returnObjById(targetID + "Content" + counter) ) {
if ( counter == 1 )
returnObjById(targetID + "Content" + counter).style.display = "block";
else
returnObjById(targetID + "Content" + counter).style.display = "none";
counter++;
}
}
counter = 1;
// Whether or not there is paging, generate normal links
while ( returnObjById(targetID + "Link" + counter) && returnObjById(targetID + "Content" + counter) ) {
var morphLink = document.createElement("span");
morphLink.innerHTML = returnObjById(targetID + "Link" + counter).innerHTML;
morphLink.setAttribute("onclick", "javascript:performMorph('" + targetID + "','" + counter + "')");
morphLink.setAttribute('onmouseover', 'style.textDecoration="underline"');
morphLink.setAttribute('onmouseout', 'style.textDecoration="none"');
morphLink.setAttribute("style", "color:blue;");
returnObjById(targetID + "Link" + counter).innerHTML = "";
returnObjById(targetID + "Link" + counter).appendChild(morphLink, 0);
// Initialize content panes
if ( counter == 1 )
returnObjById(targetID + "Content" + counter).style.display = "block";
else
returnObjById(targetID + "Content" + counter).style.display = "none";
counter++;
}
spanCollection[i].innerHTML = "1";
spanCollection[i].style.display = "none";
}
}
}
/* Function that toggles ED's collapsing objects.
* Added 11/5/2007 by WhiteMystery (misterioblanco@gmail.com)
* on Encyclopedia Dramatica, stolen by Sua Zanzità Zazy
* Taken from http://www.netlobo.com/javascript_get_element_id.html */
function returnObjById( id ) {
if (document.getElementById)
var returnVar = document.getElementById(id);
else if (document.all)
var returnVar = document.all[id];
else if (document.layers)
var returnVar = document.layers[id];
return returnVar;
}}
disablehideEdit = 1;
disablealertLoad = 1;