Utente:Cafi96/monobook.js: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Contenuto aggiunto Contenuto cancellato
Cafi96 (rosica | curriculum) mNessun oggetto della modifica |
Void (rosica | curriculum) m (Void ha spostato la pagina Utente:Cafi96 temp/monobook.js a Utente:Cafi96/monobook.js: Pagina spostata automaticamente durante la rinomina dell'utente "Cafi96 temp" a "Cafi96") |
||
(47 versioni intermedie di 3 utenti non mostrate) | |||
Riga 1: | Riga 1: | ||
//Bottoni |
|||
if (mwCustomEditButtons) { |
if (mwCustomEditButtons) { |
||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCC; |
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCC; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCancellazione; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteScadenza; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteBTA; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCit2; |
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCit2; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCitnec; |
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCitnec; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteReflink; |
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteReflink; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteAccusa; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteAPU; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteRestauro; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteFormattazione1; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteNomedimmerda; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteGallery; |
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteGallery; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteTabella; |
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteTabella; |
||
Riga 17: | Riga 10: | ||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteRedirect; |
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteRedirect; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCassetto; |
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCassetto; |
||
import_script((wgAction=='edit' || wgAction == 'submit'), "Nonciclopedia:Script/Searchbox.js"); |
|||
buttonPurge = 1; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCensura; |
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCensura; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteManuali; |
|||
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/b/b3/Pulsante_niubbi.png", |
|||
"speedTip": "Prenota il tuo NIUBBO!", |
|||
"tagOpen": "{{NST|", |
|||
"tagClose": "|{{utente:Cafi96/firma}}}" + "}\n\n", |
|||
"sampleText": "Cafi96"}; |
|||
addOnloadHook(function() { |
|||
if(!document.getElementById("toolbar")) return; |
|||
if(wgCurRevisionId) |
|||
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|' + wgCurRevisionId + '}' + '}'; |
|||
else |
|||
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|}' + '}'; |
|||
} |
|||
); |
|||
} |
} |
||
addOnloadHook(function() { |
|||
if(!document.getElementById("toolbar")) return; |
|||
if(wgCurRevisionId) |
|||
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|' + wgCurRevisionId + '}' + '}'; |
|||
else |
|||
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|}' + '}'; |
|||
} |
|||
); |
|||
addOnloadHook(quickpreviewLoad); |
|||
var quickpreview_firstLoad = true; |
|||
function quickpreview () { |
|||
document.getElementById("quickpreviewButton").disabled = true; |
|||
var previewArea = document.getElementById("wikiPreview"); |
|||
if (previewArea == null) return false; |
|||
previewArea.innerHTML = ''; |
|||
if (quickpreview_firstLoad) { |
|||
previewArea.style.display = 'block'; |
|||
var temp = document.getElementById("editintro"); |
|||
if (temp) temp.style.display = 'none'; |
|||
temp = getElementsByClass(document, "mw-newarticletext")[0]; |
|||
if (temp) temp.style.display = 'none'; |
|||
temp = getElementsByClass(document, "mw-warning-with-logexcerpt")[0]; |
|||
if (temp) temp.style.display = 'none'; |
|||
temp = document.getElementById("contentSub2"); |
|||
if (temp) temp.style.display = 'none'; |
|||
document.getElementById("firstHeading").innerHTML = wgPageName.replace(/_/g, ' '); |
|||
quickpreview_firstLoad = false; |
|||
} |
|||
var textbox = document.getElementById("wpTextbox1"); |
|||
var Source; |
|||
var start = textbox.selectionStart, end = textbox.selectionEnd; |
|||
if (start < end) Source = textbox.value.slice(start, end); |
|||
else Source = textbox.value + '\n'; |
|||
Source = Source.replace(/&/g, "%26"); |
|||
document.getElementsByTagName('body')[0].style.cursor = 'progress'; |
|||
var httpRequest; |
|||
if (window.XMLHttpRequest) { // Mozilla, Safari, ... |
|||
httpRequest = new XMLHttpRequest(); |
|||
} else if (window.ActiveXObject) { // IE |
|||
httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); |
|||
} |
|||
var id = setTimeout(function() { httpRequest.abort(); alert("Errore: il server non risponde"); Finish(false); }, 30000); |
|||
httpRequest.onreadystatechange = function () { Write(httpRequest, id); return;}; |
|||
var url = wgServer + wgScriptPath + "/api.php"; |
|||
var param = "action=parse&title=" + encodeURI(wgPageName).replace(/&/g, "%26") + "&format=xml&prop=text|categories&pst&text=__NOEDITSECTION__"; |
|||
httpRequest.open('POST', url, true); |
|||
httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); |
|||
httpRequest.setRequestHeader('Content-Length', param.length + Source.length); |
|||
httpRequest.send(param + Source); |
|||
return; |
|||
function Write(o, id) { |
|||
if (o.readyState != 4) return; |
|||
clearTimeout(id); |
|||
if (o.status != 200) { |
|||
if (o.status && (o.status < 199 || o.status > 300)) { |
|||
alert("Anteprima non riuscita. Risposta del server: " + o.status); |
|||
Finish(false); |
|||
} |
|||
return; |
|||
} |
|||
if (o.responseXML == null) { |
|||
alert("Anteprima non riuscita (errore del parser?)"); |
|||
Finish(false); |
|||
return; |
|||
} |
|||
if(o.responseXML.normalize) o.responseXML.normalize(); |
|||
var R = o.responseXML.getElementsByTagName('text')[0].firstChild; |
|||
var code = R.data; |
|||
previewArea.innerHTML += code; |
|||
// aggiungi categorie |
|||
R = o.responseXML.getElementsByTagName('categories')[0].getElementsByTagName('cl'); |
|||
if (R.length > 0) { |
|||
var catlinksBox = document.getElementById("catlinks"); |
|||
if (catlinksBox != null) catlinksBox.innerHTML = ''; |
|||
else { |
|||
catlinksBox = document.createElement('div'); |
|||
catlinksBox.id = "catlinks"; |
|||
catlinksBox.className = "catlinks"; |
|||
document.getElementById("bodyContent").insertBefore(catlinksBox, getElementsByClass(document.getElementById("bodyContent"), "visualClear", 'div')[0]); |
|||
} |
|||
var normalcatlinks = new Array(); |
|||
var hiddencatlinks = new Array(); |
|||
var catname, sortkey, catl, i; |
|||
var HCsep = '|'; |
|||
var hiddencategories = new Array("Articoli_da_cancellare", "Articoli_da_formattare", "Articoli_da_restaurare", "Articoli_da_rifinire", "Articoli_da_sorvegliare", "Articoli_da_unire", "Articoli_in_costruzione", "Articoli_in_scadenza", "Articoli_orfani", "Articoli_prenotati", "Articoli_senza_immagini", "Articoli_sotto_accusa", "Immagini_da_modificare", "Immagini_da_rinominare", "Immagini_da_tradurre", "Immagini_sotto_copyright", "Immagini/Categorie_di_sistema", "Pagine_da_cancellare", "Pagine_da_controllare", "Pagine_in_costruzione", "Pagine_in_restauro", "Pagine_sotto_accusa", "Stub"); |
|||
var hiddenCats = HCsep + hiddencategories.join(HCsep) + HCsep; |
|||
for (i=0; i<R.length; i++) { |
|||
catname = R.item(i).firstChild.nodeValue; |
|||
sortkey = R.item(i).getAttribute("sortkey"); |
|||
catl = '<span dir="ltr"><a href="/wiki/Categoria:' + encodeURI(catname) + '" title="Categoria:' + catname.replace(/_/g, ' ') + ' [sortkey: <' + sortkey + '> ]">' + catname.replace(/_/g, ' ') + '</a></span>'; |
|||
if (hiddenCats.indexOf(HCsep + catname + HCsep) == -1) normalcatlinks.push(catl); |
|||
else hiddencatlinks.push(catl); |
|||
} |
|||
var tmp = ''; |
|||
if (normalcatlinks.length > 0) { |
|||
var normalcatlinksBox = document.createElement('div'); |
|||
normalcatlinksBox.id = "mw-normal-catlinks"; |
|||
catlinksBox.appendChild(normalcatlinksBox); |
|||
tmp = "<a title='Speciale:Categorie' href='/wiki/Speciale:Categorie'>Categori" + ((normalcatlinks.length > 1)? "e</a>: " + normalcatlinks.join(" | ") : "a</a>: " + normalcatlinks[0]); |
|||
normalcatlinksBox.innerHTML = tmp; |
|||
} |
|||
if (hiddencatlinks.length > 0) { |
|||
var hiddencatlinksBox = document.createElement('div'); |
|||
hiddencatlinksBox.id = "mw-hidden-catlinks"; |
|||
hiddencatlinksBox.className = "mw-hidden-cats-hidden"; |
|||
if (normalcatlinks.length == 0) catlinksBox.className += " catlinks-allhidden"; |
|||
catlinksBox.appendChild(hiddencatlinksBox); |
|||
tmp = "Categori" + ((hiddencatlinks.length > 1)? "e nascoste: " + hiddencatlinks.join(" | ") : "a nascosta: " + hiddencatlinks[0]); |
|||
hiddencatlinksBox.innerHTML = tmp; |
|||
} |
|||
} |
|||
// mostra il toggle dell'indice |
|||
if (window.showTocToggle) { window.tocShowText = "mostra"; window.tocHideText = "nascondi"; showTocToggle(); } |
|||
// carica onloadhooks |
|||
addCss(); |
|||
createCollapseButtons (); |
|||
createNavigationBarToggleButton(); // navframe |
|||
createToggleLinks(); // morph |
|||
rewriteTitle(); |
|||
change_subtitle(); |
|||
randomlist(); |
|||
UserNameReplace(); |
|||
Finish(true) // caricamento terminato |
|||
return; |
|||
} |
|||
function Finish(success) { |
|||
document.getElementsByTagName('body')[0].style.cursor = 'auto'; |
|||
document.getElementById("quickpreviewButton").disabled = false; |
|||
return; |
|||
} |
|||
} // <- quickpreview(); |
|||
function quickpreviewLoad() { |
|||
var buttons = getElementsByClass(document, "editButtons", 'div')[0]; |
|||
if (buttons == null) return; |
|||
var b = document.createElement('input'); |
|||
b.type = 'button'; |
|||
b.value = "Ant. rapida"; |
|||
b.id = "quickpreviewButton"; |
|||
b.marginRight = "0.33em"; |
|||
if (b.addEventListener) b.addEventListener('click', quickpreview, false); |
|||
else if (b.attachEvent) b.attachEvent('onclick', quickpreview); |
|||
buttons.insertBefore(b, document.getElementById("wpDiff")); |
|||
document.getElementById("wpPreview").value = "Anteprima"; |
|||
document.getElementById("wpDiff").value = "Cambiamenti"; |
|||
var editHelp = getElementsByClass(buttons, "editHelp", 'span')[0]; |
|||
editHelp.style.fontSize = 'x-small'; |
|||
return; |
|||
} |
|||
//------------- Prelevato da: http://en.wikipedia.org/wiki/User:Zocky/SearchBox.js --------------------- |
|||
importStylesheetURI('http://nonciclopedia.wikia.com/index.php?title=Utente:Nonciclopediologo/Searchbox.css&action=raw&ctype=text/css'); |
|||
var sr$t; |
|||
var sr$f; |
|||
var sr$s; |
|||
var sr$r; |
|||
var sr$w; |
|||
var sr$i; |
|||
var sr$re; |
|||
var sr$mc; |
|||
function $e(id) {return document.getElementById(id)} |
|||
function srBack() |
|||
{ |
|||
if (sr$s.value=='') {sr$t.focus(); return } |
|||
if (sr$re.checked) { |
|||
var searchString = sr$s.value; |
|||
} else { |
|||
searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1'); |
|||
} |
|||
searchString="("+searchString+")(?![\\s\\S]*"+searchString+")"; |
|||
if (sr$mc.checked) |
|||
var re=new RegExp(searchString); |
|||
else |
|||
var re=new RegExp(searchString,"i"); |
|||
var res = re.exec (sr$t.value.substring(0,sr$t.selectionStart)); |
|||
if (!res) { |
|||
var res = re.exec (sr$t.value) |
|||
} |
|||
if (res) |
|||
{ |
|||
sr$t.selectionStart=res.index; |
|||
sr$t.selectionEnd=res.index+res[1].length; |
|||
} |
|||
else sr$t.selectionStart=sr$t.selectionEnd; |
|||
srSync(); |
|||
} |
|||
function srNext() |
|||
{ |
|||
if (sr$s.value=='') {sr$t.focus(); return } |
|||
if (sr$re.checked) { |
|||
var searchString = sr$s.value; |
|||
} else { |
|||
searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1'); |
|||
} |
|||
if (sr$mc.checked) |
|||
var re=new RegExp(searchString,"g"); |
|||
else |
|||
var re=new RegExp(searchString,"gi"); |
|||
re.lastIndex=sr$t.selectionEnd; |
|||
var res = re.exec (sr$t.value) |
|||
if (!res) { |
|||
re.lastIndex=0; |
|||
var res = re.exec (sr$t.value) |
|||
} |
|||
if (res) |
|||
{ |
|||
sr$t.selectionStart=res.index; |
|||
sr$t.selectionEnd=res.index+res[0].length; |
|||
} |
|||
else sr$t.selectionStart=sr$t.selectionEnd; |
|||
srSync(); |
|||
} |
|||
function srReplace() |
|||
{ |
|||
var sels=sr$t.selectionStart; |
|||
var sele=sr$t.selectionEnd; |
|||
var selr=sr$t.value.length-sele; |
|||
if (sr$s.value=='' || sels==sele) {sr$t.focus(); return } |
|||
if (sr$re.checked) { |
|||
var searchString = sr$s.value; |
|||
var replaceString = sr$r.value; |
|||
} else { |
|||
searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1'); |
|||
replaceString=sr$r.value.replace(/([\$\\])/g,'\\$1'); |
|||
} |
|||
if (sr$mc.checked) |
|||
var re=new RegExp(searchString,"g"); |
|||
else |
|||
var re=new RegExp(searchString,"gi"); |
|||
re.lastIndex=sels; |
|||
var res = re.exec (sr$t.value); |
|||
var $$=0; |
|||
if (res && res.index==sels && res[0].length==sele-sels) |
|||
{ |
|||
if (sr$re.checked) { |
|||
replaceString=replaceString.replace(/\\\\/g,'&backslash;'); |
|||
var replaceBits=(" "+replaceString).split(/(?=\$\d)/); |
|||
replaceString=replaceBits[0].substring(1); |
|||
for (var i=1; i<replaceBits.length; i++) |
|||
{ |
|||
$$=replaceBits[i][1]-'0'; |
|||
if ($$<res.length) |
|||
replaceString += res[$$] + replaceBits[i].substring(2) |
|||
else |
|||
replaceString += replaceBits[i]; |
|||
} |
|||
replaceString=replaceString.replace (/\\n/,"\n").replace (/&backslash;/g,"\\").replace |
|||
(/$/g,"\$") |
|||
} |
|||
sr$t.value= sr$t.value.substring(0,sels) + replaceString + sr$t.value.substring(sele); |
|||
} |
|||
sr$t.selectionStart=sels; |
|||
sr$t.selectionEnd=sr$t.value.length-selr; |
|||
srSync(); |
|||
} |
|||
function srReplaceall() |
|||
{ |
|||
if (!sr$s.value) {sr$t.focus(); return } |
|||
var sels=sr$t.selectionStart; |
|||
var sele=sr$t.selectionEnd; |
|||
var selr=sr$t.value.length-sele; |
|||
var reps; |
|||
if (sr$re.checked) { |
|||
var searchString = sr$s.value; |
|||
var replaceString = sr$r.value.replace(/\\\\/,'&backslash;').replace(/\\n/,'\n').replace(/&backslash;/,"\\"); |
|||
} else { |
|||
searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1'); |
|||
replaceString=sr$r.value.replace(/([\$\\])/g,'\\$1'); |
|||
} |
|||
if (sele>sels) |
|||
reps=sr$t.value.substring(sels,sele); |
|||
else |
|||
reps=sr$t.value; |
|||
if (sr$mc.checked) |
|||
var re=new RegExp(searchString,"g"); |
|||
else |
|||
var re=new RegExp(searchString,"gi"); |
|||
var replaceCounter=0; |
|||
var replaceFunc=function(){replaceCounter++;return replaceString}; |
|||
reps=reps.replace(re,replaceFunc); |
|||
if (sele>sels) |
|||
sr$t.value = sr$t.value.substring(0,sels) + reps + sr$t.value.substring(sele); |
|||
else |
|||
sr$t.value = reps; |
|||
sr$t.selectionStart=sels; |
|||
sr$t.selectionEnd=sele>sels ? sr$t.value.length-selr : sels; |
|||
window.status = replaceCounter+" ocurrences of " + searchString + " replaced."; |
|||
srSync(); |
|||
} |
|||
function srToggleCase() |
|||
{ |
|||
var sels=sr$t.selectionStart; |
|||
var sele=sr$t.selectionEnd; |
|||
var selr=sr$t.value.length-sele; |
|||
var selt=sr$t.value.substring(sels,sele); |
|||
if (sele>sels) |
|||
{ |
|||
if (selt==selt.toUpperCase()) |
|||
selt=selt.toLowerCase() |
|||
else if (selt==selt.toLowerCase() && sele-sels>1) |
|||
selt=selt.substring(0,1).toUpperCase()+selt.substring(1).toLowerCase() |
|||
else |
|||
selt=selt.toUpperCase(); |
|||
sr$t.value = sr$t.value.substring(0,sels) + selt + sr$t.value.substring(sele); |
|||
sr$t.selectionStart=sels; |
|||
sr$t.selectionEnd=sele>sels ? sr$t.value.length-selr : sels; |
|||
} |
|||
srSync(); |
|||
} |
|||
function srSync() |
|||
{ |
|||
var i; |
|||
var allLines=0; |
|||
var lineNo=0; |
|||
var w=sr$t.cols-5; |
|||
var dummy=sr$t.value.split("\n"); |
|||
for (i=0;i<dummy.length;i++){allLines+=Math.ceil(dummy[i].length/w)} |
|||
var dummy=sr$t.value.substring(0,sr$t.selectionStart).split("\n"); |
|||
for (i=0;i<dummy.length;i++){lineNo+=Math.ceil(dummy[i].length/w)} |
|||
// alert (w+" "+lineNo+"/"+allLines); |
|||
sr$t.scrollTop=sr$t.scrollHeight*(lineNo-10)/allLines; |
|||
sr$t.focus(); |
|||
} |
|||
function srInit() |
|||
{ |
|||
if($e('wpTextbox1')) { |
|||
var srBoxCode ='<div id="srForm"><table id="srBox" style="border-spacing: 2px;">' |
|||
+'<tr><td style="vertical-align: bottom"><span style="color:#000000; font-size: 80%;">Cerca:</span><br />' |
|||
+'<input type="text" id="srSearch" accesskey="F" tabindex="8"' |
|||
+'onkeypress="event.which == 13 && srNext()"; value=""/></td>' |
|||
+'<td style="vertical-align: bottom"><span style="color:#000000; font-size: 80%;">Sostituisci con:</span><br /><input type="text" id="srReplace" accesskey="G" tabindex="9"' |
|||
+'onkeypress="event.which == 13 && srNext()"; value=""/></td>' |
|||
+'<td style="vertical-align: top">' |
|||
+'<input type="checkbox" id="srCase" onclick="sr$t.focus()" tabindex="10"/><span style="color:#000000; font-size: 80%;">match case</span>' |
|||
+'<input type="checkbox" id="srRegexp" onclick="sr$t.focus()" tabindex="11"/><span style="color:#000000; font-size: 80%;">use regexp</span><br /> ' |
|||
+'<a href="javascript:srBack()" onmouseover="sr$t.focus()" title="Trova testo precedente [alt-2]" accesskey="2"><</a> ' |
|||
+'<a href="javascript:srNext()" onmouseover="sr$t.focus()" title="Trova testo successivo [alt-3]" accesskey="3">Trova ></a> ' |
|||
+'<a href="javascript:srReplace();srBack()" onmouseover="sr$t.focus()" title="Trova e sostituisce il testo precedente [alt-4]" accesskey="4"><</a> ' |
|||
+'<a href="javascript:srReplace()" onmouseover="sr$t.focus()" title="Trova e sostituisce il testo selezionato">Sostituisci</a> ' |
|||
+'<a href="javascript:srReplace();srNext()" onmouseover="sr$t.focus()" title="Trova e sostituisce il testo successivo [alt-5]" accesskey="5">></a> ' |
|||
+'<a href="javascript:srReplaceall()" onmouseover="sr$t.focus()" title="Sostituisci tutto [alt-7]" accesskey="7">Sostituisci tutto</a> ' |
|||
+'</td></tr></table></div>' |
|||
var ep=$e('searchInput'); |
|||
if (ep) ep.accessKey='none'; |
|||
sr$t=document.editform.wpTextbox1; |
|||
sr$w=sr$t.style.width; |
|||
var sr=document.createElement('div'); |
|||
sr.innerHTML=srBoxCode; |
|||
var im=document.createElement('span'); |
|||
im.innerHTML='<a id="SearchIcon" href="javascript:srShowHide()"><img style="cursor: pointer; border-width: 0; height: 22px; width: 23px;" title="Search/Replace" alt="Search/Replace" src="http://upload.wikimedia.org/wikipedia/en/1/12/Button_find.png"></a><a href="javascript:srToggleCase()"><img style="cursor: pointer; border-width: 0; height: 22px; width: 23px;" title="Toggle case" alt="Toggle case" src="http://upload.wikimedia.org/wikipedia/en/1/12/Button_case.png"></a>'; |
|||
var ep=$e('toolbar'); |
|||
if (ep) |
|||
{ |
|||
ep.appendChild(im) |
|||
} |
|||
else |
|||
{ |
|||
var ep=$e('editform'); |
|||
ep.parentNode.insertBefore(im,ep); |
|||
} |
|||
sr$i=$e('SearchIcon'); |
|||
sr$i.accessKey="F"; |
|||
sr.firstChild.style.display='none'; |
|||
var ep=$e('editform'); |
|||
ep.parentNode.insertBefore(sr,ep); |
|||
sr$f=$e('srForm'); |
|||
sr$s=$e('srSearch'); |
|||
sr$r=$e('srReplace'); |
|||
sr$re=$e('srRegexp'); |
|||
sr$mc=$e('srCase'); |
|||
} |
|||
} |
|||
function srShowHide() |
|||
{ |
|||
if (sr$f.style.display=='none') |
|||
{ |
|||
sr$f.style.display='block'; |
|||
sr$i.accessKey="none"; |
|||
sr$t.style.width='auto'; |
|||
sr$s.focus(); |
|||
} |
|||
else |
|||
{ |
|||
sr$f.style.display='none'; |
|||
sr$t.style.width=sr$w; |
|||
sr$i.accessKey="F"; |
|||
} |
|||
} |
|||
addOnloadHook(srInit); |
|||
// |
|||
//LiveRC |
|||
// Category translation; |
|||
importScript("Nonciclopedia:LiveRC/LiveRC.js", (wgPageName == "Nonciclopedia:LiveRC")); |
|||
// ///////////////////// |
|||
var lang_category = 'Categoria:'; |
|||
//Searchbox |
|||
// Menu translation; |
|||
importScript("Nonciclopedia:Script/Searchbox.js", (wgAction=='edit' || wgAction == 'submit')); |
|||
// ///////////////// |
|||
var lang_menu = [ { |
|||
PAUSE: "Pausa", |
|||
PREVIEW: "Anteprima", |
|||
LISTS: "Liste", |
|||
LOWDIFF: "Diff ridotti", |
|||
RCLABEL: "Pannello", |
|||
RCSHOW: "RC", |
|||
LOGSHOW: "Log", |
|||
NOBOTS: "Niente Bot", |
|||
IPONLY: "Solo IP", |
|||
NAMESP: "Namespace", |
|||
XTIMES: "volte", |
|||
UNDORC: "Annulla", |
|||
CANCIMM: "Cancella subito", |
|||
CANCCV: "Cancella x copyviol", |
|||
REVERT: "Rollback", |
|||
REASON: "Motivazione", |
|||
REASON2: "Motivazione o URL", |
|||
AVERTS: "Avvisare", |
|||
VERIF: "Segna come verificata", |
|||
RVMES1: "[[Wikipedia:Monobook.js/LiveRC/Documentazione|LiveRC]] : Annullata la modifica di", |
|||
RVMES2: "ritorno alla versione di", |
|||
EMPTY: "Svuotata" |
|||
} ]; |
|||
//Bottone Purge |
|||
// Comments test table (regexp format); |
|||
buttonPurge = true; |
|||
// //////////////////////////////////// |
|||
var commenttests = [ |
|||
{ state: BLANKING , regex: /^Pagina svuotata completamente/ }, |
|||
{ state: REPLACED , regex: /^Pagina sostituita con/ }, |
|||
{ state: REVERT , regex: /^LiveRC : Annullata la modifica|[Aa]nnullata la modifica|[Aa]nnullate le modifiche|[Aa]nnullata\]\] la modifica/ } |
|||
]; |
|||
//NoAlert |
|||
// Categories test table (regexp format); |
|||
disableAlert = true; |
|||
var categoriestests = [ |
|||
{ state: LOCK , regex: 'Pagine semiprotette' }, |
|||
{ state: FULLLOCK , regex: 'Pagine protette' }, |
|||
{ state: HOMONYMIE , regex: 'Disambigua' }, |
|||
{ state: ADQ , regex: 'Voci in vetrina' }, |
|||
{ state: COPYRIGHT , regex: 'Sospette violazioni di copyright' }, |
|||
{ state: PAS , regex: 'Avvisi di cancellazione' } |
|||
]; |
|||
strumentiChiuso = false; |
|||
// LiveRC default template use; |
|||
// //////////////////////////// |
|||
var lstAvert = [ |
|||
{ template: "Test" , string: "Test" , hasPage: true }, |
|||
{ template: "Vandalismo" , string: "Vandalismo" , hasPage: true }, |
|||
{ template: "IP Vandalismo" , string: "IP Vandalismo" , hasPage: false }, |
|||
{ template: "Avvisocopyviol" , string: "Violazione di copyright" , hasPage: true }, |
|||
{ template: "Avvisocopyviol|OTRS=no" , string: "Violazione di copyright (no OTRS)" , hasPage: true }, |
|||
{ template: "Spam" , string: "Spam" , hasPage: true }, |
|||
{ template: "Promozionale" , string: "Promozionale" , hasPage: true }, |
|||
{ template: "Senza senso" , string: "Senza senso" , hasPage: true }, |
|||
{ template: "Avvisoimmagine" , string: "Immagine senza informazioni" , hasPage: true }, |
|||
{ template: "Date personali" , string: "Date personali" , hasPage: true }, |
|||
{ template: "Benvenuto" , string: "Benvenuto" , hasPage: false }, |
|||
{ template: "Grazie" , string: "Grazie" , hasPage: true }, |
|||
{ template: "Oggetto" , string: "Oggetto" , hasPage: true }, |
|||
{ template: "Yc" , string: "Cartellino giallo" , hasPage: false }, |
|||
{ template: "WNB" , string: "WNB" , hasPage: true }, |
|||
{ template: "WND" , string: "WND" , hasPage: true }, |
|||
{ template: "WNF" , string: "WNF" , hasPage: true }, |
|||
{ template: "WNCV" , string: "WNCV" , hasPage: true }, |
|||
{ template: "WNRO" , string: "WNRO" , hasPage: true }, |
|||
{ template: "Turpiloquio" , string: "Turpiloquio" , hasPage: true }, |
|||
{ template: "Avvisoavvisi" , string: "Avvisoavvisi" , hasPage: true }, |
|||
{ template: "Loggati" , string: "Loggati" , hasPage: true }, |
|||
{ template: "InvitoNPOV" , string: "Invito NPOV" , hasPage: true }, |
|||
{ template: "Avviso sport futuro" , string: "Sport futuro" , hasPage: true }, |
|||
{ template: "Avvisosenzafonti" , string: "Senza fonti" , hasPage: true }, |
|||
{ template: "AvvisoCommento" , string: "Avviso Commento" , hasPage: true }, |
|||
{ template: "In italiano" , string: "In italiano" , hasPage: false }, |
|||
{ template: "Anteprima" , string: "Anteprima" , hasPage: false }, |
|||
{ template: "Attacco" , string: "Attacco" , hasPage: true }, |
|||
{ template: "ProposteCommenti" , string: "ProposteCommenti" , hasPage: true } |
|||
]; |
Versione attuale delle 00:00, 19 feb 2019
//Bottoni
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCC;
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCit2;
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCitnec;
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteReflink;
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteGallery;
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteTabella;
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteRiquadro2;
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteRedirect;
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCassetto;
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCensura;
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteManuali;
}
//LiveRC
importScript("Nonciclopedia:LiveRC/LiveRC.js", (wgPageName == "Nonciclopedia:LiveRC"));
//Searchbox
importScript("Nonciclopedia:Script/Searchbox.js", (wgAction=='edit' || wgAction == 'submit'));
//Bottone Purge
buttonPurge = true;
//NoAlert
disableAlert = true;
strumentiChiuso = false;