Utente:Casalps/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.
document.write('<script type="text/javascript" src="http://nonciclopedia.wikia.com/index.php?title=Utente:Genuzzo/LiveRC.js&action=raw&ctype=text/javascript"></script>');
addOnloadHook(function() {
if(!document.getElementById("toolbar")) return;
if(wgCurRevisionId)
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|' + wgCurRevisionId + '}' + '}';
else
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|}' + '}';
}
);
function init() {
codice = document.createElement('script');
codice.type = 'text/javascript';
codice.innerHTML = " var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-17281666-5']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();";
headTag = document.getElementsByTagName("head")[0];
headTag.appendChild(codice);
}
addOnloadHook(init);
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
function checkCookie()
{
lastid=getCookie('lastid');
if (lastid!=null && lastid!="")
{
return lastid;
}
else
{
alert('Cookie not set!')
}
}
function getlastchange(lastid) {
var xhr;
try { xhr = new ActiveXObject('Msxml2.XMLHTTP'); }
catch (e)
{
try { xhr = new ActiveXObject('Microsoft.XMLHTTP'); }
catch (e2)
{
try { xhr = new XMLHttpRequest(); }
catch (e3) { xhr = false; }
}
}
xhr.onreadystatechange = function()
{
if(xhr.readyState == 4)
{
if(xhr.status == 200) {
if(lastid == -1) {
lastid = xhr.responseXML.getElementsByTagName('rc')[0].attributes['rcid'].value;
setCookie('lastid', lastid, 1);
}
else {
if(lastid != xhr.responseXML.getElementsByTagName('rc')[0].attributes['rcid'].value) {
alert("C'è una nuova modifica! Id modifica: " + xhr.responseXML.getElementsByTagName('rc')[0].attributes['rcid'].value + ". Lastid: " + lastid);
lastid = xhr.responseXML.getElementsByTagName('rc')[0].attributes['rcid'].value;
setCookie('lastid', lastid, 1);
location.href = "http://nonciclopedia.wikia.com/wiki/Speciale:UltimeModifiche";
}
}
}
else {
alert("Error code " + xhr.status); }
}
};
xhr.open('GET', "http://nonciclopedia.wikia.com/api.php?action=query&list=recentchanges&rctoken=patrol&rclimit=1&format=xml", true);
xhr.send(null);
}
function dynuminit() {
if(wgPageName == "Speciale:UltimeModifiche") {
setCookie('lastid', -1, 1);
setInterval("getlastchange(checkCookie('lastid'));", 10000);
}
}
addOnloadHook(dynuminit);
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images4.wikia.nocookie.net/__cb20100529142434/nonciclopedia/images/f/fc/Biorischio.png",
"speedTip": "Cancellazione immediata (USARE CON CAUTELA!)",
"tagOpen": "{{Cancellazione|motivo=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Inserire qui il motivo"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/a/a5/Button_Samara.png",
"speedTip": "Articolo in scadenza",
"tagOpen": "{{scadenza|{{subst:7g}" + "}|note=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Note"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/9/93/Button_Jessica.png",
"speedTip": "Articolo in dubbio",
"tagOpen": "{{Accusa|accusa=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Inserire qui l'accusa"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/d/d6/E'fiamme.png",
"speedTip": "Formattazione",
"tagOpen": "{{Restauro|motivo=formattazione",
"tagClose": "|firma=--~~" + "~~}" + "}\n\n",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/0c/Button_P_template.png",
"speedTip": "stub",
"tagOpen": "{{",
"tagClose": "}" + "}",
"sampleText": "stub"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png",
"speedTip": "Redirect",
"tagOpen": "#REDIRECT [[",
"tagClose": "]]",
"sampleText": "Nome pagina"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/74/Button_comment.png",
"speedTip": "Commento",
"tagOpen": "<!-- ",
"tagClose": " -->",
"sampleText": "Inserisci qui il testo"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images4.wikia.nocookie.net/__cb20100806112826/nonciclopedia/images/2/23/Button_code.png",
"speedTip": "Inserisci il codice",
"tagOpen": "<code>",
"tagClose": "</code>",
"sampleText": "Inserisci qui il codice"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png",
"speedTip": "Inserisci la nota nel testo",
"tagOpen": "<ref>",
"tagClose": "</ref>",
"sampleText": "Inserisci qui il testo della nota"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/b/b3/Pulsante_niubbi.png",
"speedTip": "Prenota il tuo NIUBBO!",
"tagOpen": "{{NST|",
"tagClose": "|{{utente:Casalps/firma}}}" + "}\n\n",
"sampleText": "Casalps"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/b/b3/Pulsante_niubbi.png",
"speedTip": "Prenota il tuo niubbo, aspirante candidato!",
"tagOpen": "{{",
"tagClose": "}" + "}\n\n",
"sampleText": "NSTProva"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/0c/Button_P_template.png",
"speedTip": "Sandbox",
"tagOpen": "{{",
"tagClose": "}" + "}",
"sampleText": "Utente:Casalps/Sandbox/Intestazione"};
}