Utente:Senpai/monobook/recent2.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
proviamo
m top: Sostituisco tag font con span, replaced: <font color="#777">'; window.feedFailed=function(x,bundle) { try { bundle.status.innerHTML+=greyFont+'failed: '+x.statusText + '</font> → <span style="color:#777">'; window.feedFailed=function(x,b...
 
(36 versioni intermedie di 5 utenti non mostrate)
Riga 1:
/*
 
-------------------------------------------------------------------------
|ThisImportato is a copy ofda [[:en:User:Lupin/recent2.js]] byalla [[:en:User:Lupin]]versione del 26 |giugno 2006:
http://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js&oldid=60650074
|edited for the Dutchlanguaged wikipedia. |
|For more information, see [[User:Erwin85/AVT]]. |
|Latest update: |
|Revision as of 15:02, 26 June 2006 Lupin (Talk | contribs) m |
-------------------------------------------------------------------------
 
This tool hits the RSS feed for recent changes every 30 seconds or so
and checks for common vandalism. It does not make a separate server request
for every edit.
 
Currently, the RSS feed is full of holes and so this may miss many edits.
http://bugzilla.wikimedia.org/show_bug.cgi?id=3942
 
*/
Riga 21 ⟶ 17:
 
recent2={
// Edit these to your liking.
// Make sure there's a comma at the end of each line.
badwordsUrl: 'UserUtente:Senpai/badwords',
filterPage: 'UserUtente:Senpai/Filter_recent_changesFiltra_le_ultime_modifiche',
allRecentPage: 'UserUtente:Senpai/All_recent_changesTutte_le_ultime_modifiche',
recentIPPage: 'UserUtente:Senpai/Recent_IP_editsUltime_modifiche_anonime',
monitorWatchlistPage: 'UserUtente:Senpai/Monitor_my_watchlistSegui_gli_osservati_speciali',
spelldictUrl: 'UserUtente:Lists_of_common_misspellingsSenpai/For_machinesLista_degli_errori_comuni/Formato_macchina',
spelldictPage: 'UserUtente:Senpai/Live_spellcheckControllo_ortografico',
safePages: '[Ww]ikipedia:([Ii]ntroduction|[Ss]andbox|[Tt]utorial[^/]*/sandbox)',
// leave this alone
dummy: null
Riga 42 ⟶ 38:
 
var x = window.XMLHttpRequest ? new XMLHttpRequest()
: window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP")
: false;
 
if (x) {
x.onreadystatechange=function() {
Riga 50 ⟶ 46:
};
x.open("GET",bundle.url,true);
x.send(null);
}
return x;
Riga 65 ⟶ 61:
recent2.getBadWords=function() {
window.gettingBadWords=true;
recent2.download({ url: 'http://' + document.___location.hostname +
'/w/index.php?title=' + recent2.badwordsUrl + '&action=raw&ctype=text/css',
onSuccess: recent2.processBadWords, onFailure: function () { recent2.runOncesetTimeout(recent2.getBadWords, 15000); return true;}});
}
 
Riga 101 ⟶ 97:
recent2.getWatchlist=function() {
window.gettingWatchlist=true;
recent2.download({url: 'http://' + document.___location.hostname + '/wiki/SpecialSpeciale:Watchlist/edit',
onSuccess: recent2.processWatchlist, onFailure: function () { recent2.runOncesetTimeout(getWatchlist, 15000); return true; }});
}
recent2.processWatchlist=function(req, bundle) {
Riga 113 ⟶ 109:
}
}
window.watchlist=watchlist;
}
 
Riga 121 ⟶ 117:
window.gettingSpelldict=true;
recent2.download({url: 'http://' + document.___location.hostname + '/w/index.php?title=' + recent2.spelldictUrl + '&action=raw&ctype=text/css',
onSuccess: recent2.processSpelldict, onFailure: function () { recent2.runOncesetTimeout(getSpelldict, 15000); return true; }});
}
recent2.processSpelldict=function(req, bundle) {
Riga 141 ⟶ 137:
 
 
var feed='http://' + document.___location.hostname + '/w/index.php?title=Speciale:Recentchanges&feed=rss';
recent2.runOnce=function(f, time) {
var i=recent2.runOnce.timers.length;
var ff = function () { clearInterval(recent2.runOnce.timers[i]); f() };
var timer=setInterval(ff, time);
recent2.runOnce.timers.push(timer);
}
recent2.runOnce.timers=[];
 
var feed='http://' + document.___location.hostname + '/w/index.php?title=Special:Recentchanges&feed=rss';
 
window.newOutputDiv=function(klass, position, immortal) {
var h1=document.getElementsByTagName('h1')[0];
var ret=document.createElement('div');
if (klass) { ret.className=klass; }
if (!position) { position='bottom'; }
switch(position) {
case 'top':
h1.parentNode.insertBefore(ret, h1.nextSibling);
break;
Riga 180 ⟶ 168:
window.grabRecentChanges=function(feed) {
if (! window.badWords && recent2.filter_badwords ) {
if ( ! window.gettingBadWords ) { recent2.getBadWords(); }
return recent2.runOncesetTimeout(function(){grabRecentChanges(feed);}, 500);
}
if (! window.watchlist && recent2.filter_watchlist) {
if (! window.gettingWatchlist ) recent2.getWatchlist();
return recent2.runOncesetTimeout(function(){grabRecentChanges(feed);}, 500);
}
if (! window.spelldict && recent2.filter_spelling) {
if (! window.gettingSpelldict) recent2.getSpelldict();
return recent2.runOncesetTimeout(function(){grabRecentChanges(feed);}, 500);
}
var pos=recent2.outputPosition;
Riga 201 ⟶ 189:
status.style.borderStyle='solid';
status.style.borderColor='orange';
status.innerHTML=greyFont+'(' + recent2.count + ') updatingaggiornamento...</font>';
 
// this abort stuff doesn't work properly for some reason...
Riga 209 ⟶ 197:
}
 
var greyFont='<fontspan colorstyle="color:#777">';
 
window.feedFailed=function(x,bundle) {
try { bundle.status.innerHTML+=greyFont+'failed: '+x.statusText + '</fontspan>'; }
catch (err) { bundle.status.innerHTML+=greyFont+'failed badly: '+err+'</font>'; }
return true;
Riga 232 ⟶ 220:
recent2.delayedLines={};
recent2.delay=0;
recent2.namespaces={'Media':1, "SpecialSpeciale":1, "UserUtente":1, "UserDiscussioni talkutente":1, "Wikipedia":1,
"WikipediaDiscussioni talkWikipedia":1, "ImageImmagine":1, "ImageDiscussioni talkimmagine":1, "MediaWiki":1,
"MediaWikiDiscussioni talkMediaWiki":1, "Template":1, "TemplateDiscussioni talktemplate":1, "HelpAiuto":1,
"HelpDiscussioni talkaiuto":1, "CategoryCategoria":1, "CategoryDiscussioni talkcategoria":1, "PortalPortale":1, "PortalDiscussioni talkportale":1, "Progetto":1, "Discussioni progetto":1};
window.processRecentChanges=function(req, bundle){
var initialId=processRecentChanges.id;
var doc=req.responseXML.documentElement;
var items=doc.getElementsByTagName('item');
var latest=processRecentChanges.lastDate;
var safePagesRe=new RegExp('^' + recent2.safePages + '$');
for (var i=items.length - 1; i>=0; --i) {
var timestamp = Date.parse(getFirstTagContent(items[i],'pubDate'));
Riga 248 ⟶ 237:
var editSummary=diffText.replace(RegExp('^<p>(.*?)</p>[\\s\\S]*'), '$1');
var editor=getFirstTagContent(items[i], 'creator') || getFirstTagContent(items[i], 'dc:creator');
if (recent2.ignore_my_edits && wgUserName==editor) { continue; }
 
var article=getFirstTagContent(items[i], 'link');
if (recent2.ignore_safe_pages && safePagesRe.test(article)) { continue; }
if (recent2.delayedLines[article] && recent2.delayedLines[article].editor != editor) {
delete recent2.delayedLines[article];
}
 
if (recent2.filter_anonsOnly && !recent2.ipUserRegex.test(editor)) { continue; }
 
var articleTitle=getFirstTagContent(items[i], 'title');
Riga 262 ⟶ 253:
}
if (! recent2.show_talkpages && articleTitle && /^Talk:|^[^:]*?[_ ]talk:/.test(articleTitle)) continue;
if (recent2.filter_watchlist && articleTitle &&
! window.watchlist[articleTitle.replace(/^Talk:/, '').replace(/[ _]talk:/, ':')]) continue;
if (recent2.filter_badwords) {
var badMatch=null;
if (window.vandals[editor] > 0) { badMatch=['', '', '[previously rolled back this editor]']; }
else { badMatch=badWords.test(diffText); }// .test() is meant to be faster than a full match
if (badMatch) {
if (badMatch===true) { badMatch=diffText.match(badWords); }
articleTitle=getFirstTagContent(items[i], 'title');
var badWord=badMatch[2] || badMatch[4];
if (articleTitle.toLowerCase().indexOf(badWord.toLowerCase())>-1) { continue; } // avoid "Oral sex matched Oral sex"
// highlighting
// highlighting
badMatch[0]=badMatch[0].split(badWord).join('<span style="background-color: #FF6">'+badWord+'</span>');
badMatch[0]=badMatch[0].split(badWord).join('<span style="background-color: #FF6">'+badWord+'</span>');
recent2.delayedLines[article]={timestamp: timestamp, article:article, count:recent2.count, articleTitle:articleTitle,
recent2.delayedLines[article]={timestamp: timestamp, article:article, count:recent2.count, articleTitle:articleTitle,
editor:editor, badWord:badWord, badDiffFragment:badMatch[0], diff:diffText,
summary:editSummary};
Riga 283 ⟶ 275:
splMatch = diffText.match(spellRe);
var misspelling = splMatch[1]; //.replace(/^\s*/, '');
var badWord = '<a href=\'javascript:recent2.correctSpelling("' + articleTitle.split("'").join("%27") +
'","'+misspelling.split("'").join("%27")+'")\'>'+ misspelling + '</a>';
diffText = diffText.replace(RegExp('('+misspelling+')', 'gi'), '<span style="background-color: #FF6">$1</span>');
Riga 292 ⟶ 284:
var article=getFirstTagContent(items[i], 'link');
var articleTitle=getFirstTagContent(items[i], 'title');
if (recent2.CustomFilter &&
! recent2.CustomFilter({timestamp:timestamp, article:article, articleTitle:articleTitle,
editor:editor, diff:diffText, summary:editSummary})) continue;
recent2.delayedLines[article]={timestamp: timestamp, article:article, count:recent2.count, articleTitle:articleTitle,
Riga 300 ⟶ 292:
} /* end for loop */
var output=recent2.getDelayedLineOutput();
//console.log(output);
var outputString='';
if (recent2.outputPosition=='top') {
Riga 310 ⟶ 303:
}
bundle.output.innerHTML+=outputString;
if (recent2.runOnce(function(wait_for_output) { recent2.doPopupspauseOutput(bundle.output); }, 300);
setTimeout(function() {recent2.doPopups(bundle.output)}, 300);
processRecentChanges.lastDate=latest; // - 1; // overlap better than missing some out, i think; FIXME do this properly
var statusTail=greyFont+'doneterminato up toalle ' + formatTime(latest) + '</font>';
if (processRecentChanges.id > initialId) {
statusTail+=' <a href="javascript:showHideDetailRange(' + initialId + ',' + processRecentChanges.id + ')">alternar detalhesdettagli</a> |';
if (recent2.autoexpand) {
recent2.runOncesetTimeout( function() {
/* document.title=initialId+' '+processRecentChanges.id; */
showHideDetailRange(initialId, processRecentChanges.id); }, 250 );
}
}
statusTail += ' <a href="javascript:deleteEarlierOutputDivs(' + bundle.status.id + ')">limparrimuovi listaaggiornamenti anteriorprecedenti</a>';
if (recent2.wait_for_output) {
statusTail += ' | <a href="javascript:recent2.unpauseOutputOnce()">mostra nuovi aggiornamenti</a>';
}
statusTail+='<br>';
bundle.status.innerHTML+=statusTail;
Riga 332 ⟶ 329:
var id=processRecentChanges.id;
for (var a in recent2.delayedLines) {
if (recent2.delayedLines[a] && typeof recent2.delayedLines[a].count == typeof 1 &&
recent2.count - recent2.delayedLines[a].count >= recent2.delay) {
recent2.delayedLines[a].id=id++;
ret.pushvar line=(recent2.doLine(recent2.delayedLines[a]));
if (line) { ret.push(line); }
delete recent2.delayedLines[a];
}
Riga 395 ⟶ 393:
for (var i=0; i<document.links.length && count < max; ++i) {
if(document.links[i].innerHTML==action + ' details' && document.links[i].href.indexOf('javascript:') == 0) {
++count;
eval(document.links[i].href.replace('javascript:', ''));
}
Riga 403 ⟶ 401:
 
recent2.pendingLines=[];
 
recent2.unpauseOutputOnce=function() {
//console.log('unpausing once');
if (recent2.pausedOutput) {
recent2.togglePausedOutput();
recent2.togglePausedOutput();
}
}
 
recent2.pauseOutput=function() {
//console.log('pausing');
if (!recent2.pausedOutput) { recent2.togglePausedOutput(); }
//console.log(recent2.pausedOutput);
}
recent2.unpauseOutput=function() {
//console.log('unpausing');
if (recent2.pausedOutput) { recent2.togglePausedOutput(); }
//console.log(recent2.pausedOutput);
}
 
recent2.togglePausedOutput=function() {
if (!recent2.pausedOutput) { recent2.pausedOutput = true; return true; }
else recent2.pausedOutput=false;
var outputBuffer='';
while (recent2.pendingLines.length) {
outputBuffer+=recent2.doLine(recent2.pendingLines.pop());
if (recent2.pendingLines.length) { outputBuffer+=recent2.outputSeparator; }
}
var pos=recent2.outputPosition;
var output=newOutputDiv('recent2.lines', pos);
output.innerHTML=outputBuffer;
setTimeout(function() {recent2.doPopups(output)}, 300);
return false;
}
Riga 443 ⟶ 462:
formatTime(bundle.timestamp) + ' ' +
//latest + ' ' + processRecentChanges.lastDate + ' ' +
'(' + linkmaker(lastDiffPage, 'lastdiff') + ')' +
' (' + linkmaker(bundle.article+'?action=history', 'histcron') + ')' +
' ' + linkmaker(bundle.article, bundle.articleTitle) +
( bundle.badWord ? ' coincidiu comcontiene <b>' + bundle.badWord + '</b> . . ' : ' . . ') +
linkmaker(wikiBase + 'UserUtente:' + bundle.editor, bundle.editor) + ' (' +
linkmaker(wikiBase + 'User_talkDiscussioni utente:' + bundle.editor, 'discdiscussioni') + ' | ' +
linkmaker(wikiBase + 'DiscussioneDiscussioni utente:' + bundle.editor + '?action=edit' +
'&autoedit=s#$#\\n{{Av-tes' + 'ttest|voce=' + bundle.articleTitle + '}}%20~~' + '~~#&autosummary=Aviso (mensagem automática: AVT)',
'}}%20~~' + '~~#&autosummary=I%20tuoi%20ultimi%20edit',
'test') + ' | ' +
'avvisa') + ' | ' +
linkmaker(wikiBase + 'Discussione utente:' + bundle.editor + '?action=edit' +
linkmaker(wikiBase + 'Speciale:Contributions/' + bundle.editor, 'contributi') + ' | ' +
'&autoedit=s#$#\\n{{avi' + 'so|' + bundle.articleTitle + '}}%20~~' + '~~#&autosummary=Aviso (mensagem automática: AVT)',
linkmaker(wikiBase + 'Speciale:Blockip/' + bundle.editor, 'avblocca') + ') . |. ' +
linkmaker(wikiBase + 'Discussione utente:' + bundle.editor + '?action=edit' +
'&autoedit=s#$#\\n{{avis' + 'o1|' + bundle.articleTitle + '}}%20~~' + '~~#&autosummary=Aviso1 (mensagem automática: AVT)',
'av1') + ' | ' +
linkmaker(wikiBase + 'Discussione utente:' + bundle.editor + '?action=edit' +
'&autoedit=s#$#\\n{{av-im' + 'g|' + bundle.articleTitle + '}}%20~~' + '~~#&autosummary=Aviso imagem (mensagem automática: AVT)',
'img') + ' | ' +
linkmaker(wikiBase + 'Discussione utente:' + bundle.editor + '?action=edit' +
'&autoedit=s#$#\\n{{sub' + 'st:bv}}%20~~' + '~~#&autosummary=Bem-vindo (mensagem automática: AVT)',
'bv') + ' | ' +
linkmaker(wikiBase + 'Usuário Discussão:' + bundle.editor + '?action=edit' +
'&autoedit=s#$#\\n{{sub' + 'st:bem-vindo ip}}%20~~' + '~~#&autosummary=Bem-vindo IP (mensagem automática: AVT)',
'bvip') + ' | ' +
linkmaker(wikiBase + 'Special:Contributions/' + bundle.editor, 'contribs') + ' | ' +
linkmaker(wikiBase + 'Special:Blockip/' + bundle.editor, 'bloq') + ') . . ' +
( bundle.summary ? '<i>('+bundle.summary+')</i> . . ' : '') +
'<a href="javascript:showHideDetail(' + bundle.id + ')" id="showdiff_link_' + bundle.id + '">detalhesdettagli</a>' +
' . . [<a href="javascript:tryRollback(' + bundle.id + ')" class="recent2_rollback">reverterrollback</a>]' +
'<p><div id="diff_div_' + bundle.id + '" style="display: none">' +
'</div></li>' +
Riga 491 ⟶ 496:
if (num > -1 && num < cor.length) { cor = cor[num]; }
else { cor = ans; }
} else {
cor = cor[0];
}
cor=cor.replace(/^ *| *$/g, '');
url += '&autosummary=SpellingcorrectieCorrecting%20spelling:%20' + wl + '->' + cor;
url += '&autoedit=';
c0=cor.charAt(0);
Riga 525 ⟶ 530:
recent2.getBundleVandal=function(id) {
var b=window.bundles[id];
if (!b) {
alert('No bundle! Please tell Lupin how to reproduce this error - it should not really happen.');
return null;
}
var vandal=b.editor;
Riga 547 ⟶ 552:
var match=rollRe.exec(x.responseText);
if (!match) {
alert('NoNon rollbackè stato trovato nessun link foundper il rollback.' +
'\nMaybenForse youdevi shouldattivare tryla the non-adminfunzione rollback byper i non ammistratori, checkingcliccando thenel checkboxriquadro abovesovrastante?\n' +
'Alternatively,In thisalternativa, maypotrebbe beessere aun bug.');
return;
}
Riga 558 ⟶ 563:
var summary=lastSummary.replace(RegExp('<[^>]*?>','g'),'');
if (!summary) summary=lastSummary;
alert( 'CouldImpossibile noteffettuare il rollback - someonequalcun\'altro ha elseeditato hasla editedpagina sincedopo theil vandalvandalo.\n\nPage: '+ b.articleTitle +
'\nVandalnVandalo: '+vandal+'\nLastnUltimo editorcontributore: '+lastEditor+'\nEdit summarynOggetto: '+summary);
return;
}
var rollbackUrl=match[1].split('&amp;').join('&');
// confirm('Rollback edits by '+vandal + ' to '+b.articleTitle+'?') &&
window.open(rollbackUrl, '_blank');
}
var onFailure = function(x,bundle) {
alert('HTTP failed when trying to get rollback link in url\n' + bundle.url +
'\n\nHTTP status text: ' + x.statusText);
return true;
}
Riga 575 ⟶ 580:
 
recent2.tryNonAdminRollback=function(id) {
if (!autoEdit) { alert('YouTu needhai tobisogno havedi autoeditattivare functionalityil forrollback per i non-admin rollbackamministratori.\n\n' +
'Esso è incluso nei [[Wikipedia:Popup_di_navigazione|popup di navigazione]].\n\n'); return; }
'This is included in Navigation popups - see [[WP:POP]].\n\n'+
'Alternatively, you can try adding '+
'{{sub'+'st:js|User:Lupin/autoedit.js}} ' +
'to your user javascript file.'); return; }
var b=recent2.getBundleVandal(id);
if (!b) { return; }
Riga 591 ⟶ 593:
recent2.processHistoryQuery=function(x,downloadBundle, bundle) {
var json=x.responseText;
try {
eval('var o='+json);
var p=o['pages'];
var edits=recent2.anyChild(p)['revisions'];
}
catch ( someError ) { alert('JSON business failed.\n\n' + json.substring(0,100)
+ '\n\nCannot rollback.'); return; }
var i;
Riga 602 ⟶ 604:
if (edits[i]['user']!=bundle.editor) { break; }
}
if (i===0) {
alert( 'Could not rollback - someone else has edited since the vandal.\n\nPage: '+ bundle.articleTitle +
'\nVandal: '+bundle.editor+'\nLast editor: '+edits[0]['user']+'\nEdit summary: '+edits[0]['*comment']);
return;
}
if (i==edits.length) { alert(bundle.editor + ' seemssembra tol\'unico beautore thedella only editor topagina ' + bundle.articleTitle +
'.\n\nRollback abortedfallito.'); return; }
var prevEditor=edits[i]['user'];
var prevRev=edits[i]['revid'];
var summary='WijzigingenRipristino doormodifiche di [[SpecialSpeciale:Contributions/' + escape(bundle.editor) + '|' +
escape(bundle.editor) + ']] hersteldrecuperando totl\'ultima deversione versie na de laatste wijziging doordi ' + escape(prevEditor) + ' m.b.v. [[Gebruiker:Erwin85/AVT|AVT]].';
summary=summary.split(' ').join('%20');
var url=bundle.article + '?action=edit&autosummary=' + summary + '&oldid=' + prevRev +
'&autoclick=wpSave&autominor=true';
window.open(url, '_blank');
Riga 629 ⟶ 631:
 
recent2.doPopups=function(div) {
if (typeof(mouseOverWikiLinkwindow.setupTooltips)!='undefined') &&{ setupTooltips(div); }
typeof(mouseOutWikiLink) !='undefined' &&
typeof(killPopup) !='undefined') {
var anchors=div.getElementsByTagName('A');
for (var i=0; i<anchors.length; ++i) {
var a=anchors[i];
if (a.href.indexOf('javascript')==0) continue;
a.onmouseover=mouseOverWikiLink;
a.onmouseout= mouseOutWikiLink;
a.onclick= killPopup;
}
}
}
 
Riga 656 ⟶ 647:
var bundle=window.bundles[id];
if (!div.innerHTML) div.innerHTML= ( bundle.badDiffFragment ? bundle.badDiffFragment:'') + bundle.diff;
if ((force && state==true) || (!force && div.style.display=='none')) { div.style.display='inline'; lk.innerHTML='hide detailsnascondi'; }
else { div.style.display='none'; lk.innerHTML='show detailsdettagli'; }
 
}
 
Riga 665 ⟶ 656:
var e=parent.getElementsByTagName(tag);
if (e && (e=e[0]) ) {
var ret = e.firstChild.nodeValue || e.nodeValue;
if (typeof ret != typeof '') return '';
return ret;
}
}
 
recent2.newCheckbox=function(label, state, onclickaction, internalName) {
// checkbox
var ret=document.createElement('input');
ret.type='checkbox';
ret.checked = state;
ret.onclick = onclickfunction() { recent2.setBoxCookies(); this.setVariables(); };
ret.setVariables = action;
recent2.controls.appendChild(ret);
if (internalName) { recent2.controls[internalName]=ret; }
Riga 682 ⟶ 674:
var l=document.createElement('label');
l.innerHTML=label;
l.onclick=function(){ ret.click(); }
recent2.controls.appendChild(l);
recent2.checkboxes.push(ret);
 
return ret;
};
 
recent2.checkboxes=[];
 
recent2.setBoxCookies=function() {
var n=1;
var val=0;
for (var i=0; i<recent2.checkboxes.length; ++i) {
val += n * (recent2.checkboxes[i].checked ? 1 : 0);
n = n << 1;
}
document.cookie = 'recent2_checkboxes='+val+"; expires=Tue, 31-Dec-2030 23:59:59 GMT; path=/";
};
 
recent2.setCheckboxValuesFromCookie=function() {
var val=recent2.readCookie('recent2_checkboxes');
if (!val) { return; }
val=parseInt(val, 10);
for (var i=0; i<recent2.checkboxes.length; ++i) {
if ( recent2.checkboxes[i].checked != (val & 1) ) {
recent2.checkboxes[i].checked= (val & 1);
recent2.checkboxes[i].setVariables();
}
val = val >> 1;
}
};
 
recent2.readCookie=function(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') { c = c.substring(1,c.length); }
if (c.indexOf(nameEQ) === 0) { return c.substring(nameEQ.length,c.length); }
}
return null;
};
 
 
recent2.controlUI=function() {
recent2.controls=newOutputDiv('recent2.controls', 'top', true);
recent2.controls.newline = function(){ recent2.controls.appendChild(document.createElement('br')); };
var line=function(a,b,c,d){ recent2.newCheckbox('Ignorar páginas de discussão'a,b,c,d); !recent2.show_talkpages,controls.newline(); }
 
function() { recent2.show_talkpages=!this.checked; },
line('Ignora le pagine di discussione', !recent2.show_talkpages,
'talk');
function() { recent2.show_talkpages=!this.checked; }, 'talk');
recent2.controls.newline();
line('Ignora le pagine non appartenenti al namespace principale', false,
recent2.newCheckbox('Ignorara páginasfora do domínio principal', false,
function() { recent2.hideNonArticles = this.checked; }, 'hidenonarticles');
line('Espandi automaticamente gli aggiornamenti', recent2.autoexpand,
'hidenonarticles');
function() { recent2.autoexpand = this.checked; }, 'autoexpand');
recent2.controls.newline();
line('Visualizza solo le modifiche immutate dopo 4 aggiornamenti', false,
recent2.newCheckbox('Expandir automaticamente o novo conteúdo', recent2.autoexpand,
function() { recent2.autoexpanddelay = (this.checked) ? 4 : 0; }, 'delayby4');
line('Usa il rollback per i non amministratori', false,
'autoexpand');
function() { recent2.non_admin_rollback = this.checked; }, 'nonadminrollback');
recent2.controls.newline();
line('Ignora le mie modifiche', false,
recent2.newCheckbox('Mostrar apenas edições não modificadas após 4 actualizações', false,
function() { recent2.delayignore_my_edits = (this.checked) ? 4 : 0; }, 'ignoremyedits');
line('Ignora le pagine sicure', false,
'delayby4');
function() { recent2.ignore_safe_pages = this.checked; }, 'ignoresafepages');
recent2.controls.newline();
// line('Only show output when I ask for it', false,
recent2.newCheckbox('Usar reversão (para não administradores)', false,
// function() { recent2.non_admin_rollback = this.checked; },
// recent2.wait_for_output = this.checked;
'nonadminrollback');
// if (this.checked) { recent2.pauseOutput(); }
// else {recent2.unpauseOutput(); }
// }, 'waitforoutput');
var b=document.createElement('input');
b.type='button';
b.value='interrompi aggiornamenti';
b.onclick=function(){
b.value=(recent2.paused)?'interrompi aggiornamenti':'riprendi aggiornamenti';
recent2.togglePaused();
}
recent2.controls.appendChild(b);
recent2.setCheckboxValuesFromCookie();
}
 
Riga 717 ⟶ 759:
loopRecentChanges.url=url;
grabRecentChanges(url);
recent2.runOncesetTimeout(function () {
if (recent2.paused) {++recent2.count; return; }
if (++recent2.count >= iterations && ! confirm('ContinueVuoi monitoringcontinuare recenta changescontrollare le ultime modifiche?') ) return;
recent2.count %= iterations; loopRecentChanges(url, iterations);
}, 30000);
}
window.marvin=function() {
// this isn't really used (not accessible from the UI), so don't worry about it
window.sysops=RegExp("^(\\-\\- April|23skidoo|A Man In Black|ABCD|ALoan|Academic Challenger|Acetic Acid|Adam Bishop|Ahoerstemeier|Alabamaboy|Alai|AlainV|Alex S|Alex756|AlistairMcMillan|Alkivar|Allen3|AllyUnion|Alteripse|Ambi|Ams80|Andres|Andrevan|Andrew Yong|Andrewa|Andris|Android79|Angela|Angr|Antandrus|Anthere|AntonioMartin|Aranel|Arcadian|Aris Katsaris|Arminius|Arvindn|Arwel Parry|Asbestos|AstroNomer|Ausir|AxelBoldt|BanyanTree|BaronLarf|Bcorr|Bdesham|Bearcat|Beland|Benc|Bhadani|Biekko|BillyH|Bishonen|Bkonrad|Blankfaze|Bluemoose|Bmicomp|Bovlb|Bratsche|Brian Kendig|Brian0918|BrianSmithson|Briangotts|Brighterorange|Brion VIBBER|Brockert|BrokenSegue|Brookie|Bryan Derksen|Bumm13|Burgundavia|CJCurrie|COGDEN|CSTAR|CYD|Cacycle|Caltrop|CambridgeBayWeather|Camembert|Canderson7|Capitalistroadster|Carbonite|Carnildo|Catbar|CatherineMunro|Cburnett|Cdc|Cecropia|Cedar\\-Guardian|Celestianpower|CesarB|Cgs|Chadloder|Chancemill|Changlc|Charles Matthews|Chmod007|Chris 73|Chris Roy|ChrisO|Christopher Mahan|Chuck SMITH|Chuq|Cimon avaro|Clarkk|Clifford Adams|ClockworkSoul|Commander Keane|ContiE|Cool Hand Luke|Cprompt|Craigy144|Cryptic|CryptoDerk|Curps|Cutler|Cyan|Cyberjunkie|CyborgTosser|Cyp|Cyrius|DESiegel|DF08|DJ Clayworth|Dale Arnett|Dan100|DanKeshet|Daniel Quinlan|DanielCD|Danny|Dante Alighieri|Darwinek|Dave souza|David Gerard|David Newton|David\\.Monniaux|DavidLevinson|DavidWBrooks|Davidcannon|Davodd|Dbachmann|Dbenbenn|Dbiv|Dcoetzee|Deb|Decumanus|Delirium|Denelson83|Denni|Derek Ross|Dgrant|Diberri|Dieter Simon|Dino|Dmcdevit|Dmn|Doc glasgow|Docu|Dori|Dpbsmith|DrBob|DragonflySixtyseven|Dragons flight|Drini|DropDeadGorgias|Duk|Duncharris|Durin|Dvyost|Dwheeler|Dysprosia|Earl Andrew|Ed Poor|Ed g2s|Edcolins|Edward|Efghij|Egil|El C|Elf|Ellsworth|Eloquence|Enchanter|Essjay|Eugene van der Pijll|Evercat|Everyking|Evil Monkey|Evil saltine|Evilphoenix|Exploding Boy|Ezhiki|FCYTravis|Fabiform|Fantasy|Fastfission|Fawcett5|Feco|FeloniousMonk|Fennec|Ferkelparade|Fernando Rizo|Ffirehorse|Filiocht|Finlay McWalter|Fire Star|FireFox|Flcelloguy|Flockmeal|Francs2000|Frazzydee|Fred Bauder|Fredrik|Freestylefrappe|FreplySpang|Friday|Func|Furrykef|Fuzheado|Fvw|G\\-Man|Gabbe|Gadfium|Gamaliel|Garzo|Gaz|Gdr|GeneralPatton|Geni|Gentgeen|Geogre|Gerald Farinas|Goatasaur|Golbez|Graft|GregAsche|GregRobson|Grenavitar|Grm wnr|Ground Zero|Grue|Grunt|Grutness|Gtrmp|Guettarda|Gwalla|Gyrofrog|Hadal|Hajor|Hall Monitor|HappyCamper|Hashar|Hawstom|Hcheney|Hedley|Hemanshu|Henrygb|Hephaestos|Hermione1980|Heron|Homeontherange|Humblefool|Hyacinth|Icairns|IceKarma|Ihcoyc|Ike9898|Ilyanep|Improv|Imran|Infrogmation|Ingoolemo|Inter|Isomorphic|Ixfd64|J\\.J\\.|JCarriker|JHK|JIP|JRM|JYolkowski|Jake Nelson|Jallan|JamesTeterenko|Jamesday|Jasonr|Jaxl|Jay|Jayjg|Jcw69|Jdavidb|Jdforrester|JeLuF|Jeffrey O\\. Gustafson|Jengod|JeremyA|Jeronimo|Jerzy|JesseW|Jfdwolff|Jiang|Jimbo Wales|Jimfbleak|Jimregan|Jinian|Jitse Niesen|Jmabel|Jnc|Jni|JoJan|John Kenney|JohnOwens|Johnleemk|Johntex|JonMoore|Jondel|Joolz|Josh Grosse|Jossifresco|Journalist|Joy|Joy Stovall|Jpgordon|Jrdioko|Jredmond|Jtdirl|Jtkiefer|Justinc|Jwrosenzweig|K1Bond007|KF|Kaihsu|Kaldari|Karada|Karen Johnson|Karmafist|Katefan0|Kbdank71|Kelly Martin|Khaosworks|Khendon|Khym Chanur|Kingturtle|Kirill Lokshin|Kmccoy|Knowledge Seeker|Kosebamse|Ktsquare|Kwamikagami|Kzollman|LC|Lachatdelarue|Lacrimosus|Lectonar|Lee Daniel Crocker|Lexor|Linuxbeak|LittleDan|Llywrch|Lommer|Longhair|Lord Emsworth|LordAmeth|LouI|Lowellian|Lucky 6\\.9|Ludraman|Lupin|Lupo|MC MasterChef|MacGyverMagic|Mackensen|Mackeriv|Madchester|Magnus Manske|Mailer diablo|Mairi|Malcolm Farmer|Manning Bartlett|Marianocecowski|Marine 69\\-71|Mark|Mark Christensen|Mark Dingemanse|Mark Richards|MarkSweep|Markalexander100|Marshman|Marudubshinki|Marumari|Master Thief Garrett|Matt Crypto|Maury Markowitz|Maveric149|Maximus Rex|Mbecker|Meelar|Mel Etitis|Menchi|Merovingian|Merphant|Mic|Michael Hardy|Michael Snow|Mike Halterman|Mikkalai|Mindspillage|Minesweeper|Mintguy|Mirv|Mirwin|Mkmcconn|Mkweise|Modemac|Moink|Moncrief|Montrealais|Moriori|Morven|Morwen|Mulad|Mustafaa|MyRedDice|MykReeve|Mysekurity|Mzajac|Nabla|Nandesuka|Nanobug|Necrothesp|Neutrality|Ngb|Nichalp|NicholasTurnbull|Nickptar|Nickshanks|Niteowlneils|Nohat|Noldoaran|Notheruser|Nufy8|Nunh\\-huh|Nv8200p|Oberiko|OldakQuill|Oleg Alexandrov|Oliver Pereira|Olivier|Omegatron|Optim|Ortolan88|Oven Fresh|OwenX|PFHLai|PMA|PRueda29|PZFUN|Pakaran|Pamri|Patrick|Paul A|Paul August|Pcb21|PedanticallySpeaking|Petaholmes|Peter Winnberg|Pfortuny|Pharos|Phil Bordelon|Phil Boswell|Phils|Philwelch|Phroziac|Physchim62|PierreAbbat|Piotrus|Pjacobi|Pollinator|Poor Yorick|Postdlf|Pratyeka|Premeditated Chaos|Proteus|Psy guy|Qaz|Quadell|Quercusrobur|R\\. fiend|R3m0t|RHaworth|RJFJR|RN|Radiant\\!|RadicalBender|Ragib|Ral315|Ram\\-Man|Rama|Ramallite|Ran|Raul654|Rbrwr|Rd232|Rdsmith4|RedWolf|RedWordSmith|Redux|Redwolf24|Refdoc|Reflex Reaction|Rfl|Rhobite|Rholton|Rhymeless|Rich Farmbrough|Rick Block|RickK|Rje|Rlandmann|Rlquall|Rmhermen|Roadrunner|RobLa|Robchurch|Robert Merkel|RobertG|Robin Patterson|RobyWayne|Roozbeh|RoseParks|Rossami|RoyBoy|RoySmith|Rx StrangeLove|Ryan Delaney|SD6\\-Agent|SWAdair|Salsa Shark|Sam Hocevar|Sam Korn|Sango123|Sannse|Sarge Baldy|Sasquatch|Schissel|Schneelocke|Scimitar|Scipius|Scott Burley|ScottDavis|Seabhcan|Sebastiankessel|Secretlondon|Seglea|Sesel|Seth Ilys|Sfoskett|Shanes|Shauri|Sheldon Rampton|Shimgray|SimonP|Siroxo|Sj|Sjakkalle|Sjc|Slambo|SlimVirgin|Slowking Man|Slrubenstein|Smith03|Sn0wflake|Snowspinner|Snoyes|Solipsist|Someone else|Sortior|Spangineer|Spencer195|Splash|Ssd|Stan Shebs|Starblind|Stevenj|Stevertigo|Stewartadcock|Stormie|Sugarfish|Sundar|Sverdrup|TPK|TUF\\-KAT|Ta bu shi da yu|Talrias|Tannin|Tarquin|Taw|Taxman|TenOfAllTrades|Texture|Thames|The Anome|The Cunctator|The Epopt|The Singing Badger|The wub|TheCoffee|TheoClarke|Theresa knott|Thryduulf|Thue|Thunderbrand|Tillwe|Tim Ivorson|Tim Starling|Timc|Timrollpickering|Timshell|Timwi|Titoxd|Tkinias|Toby Bartels|Tom\\-|Tomf688|Tompagenet|Tony Sidaway|Topbanana|Tregoweth|Trevor macinnis|Triddle|Trilobite|Tristanb|Ugen64|Ulayiti|Uncle G|UninvitedCompany|Urhixidur|Utcursch|UtherSRG|Vague Rant|VampWillow|Vancouverguy|Vaoverland|Viajero|Vicki Rosenzweig|Violetriga|Visorstuff|Voice of All\\(MTG\\)|Vsmith|Waltpohl|Wapcaplet|Warofdreams|Wayward|Wernher|Wesley|WhisperToMe|Who|Wiglaf|Wikiacc|Wikibofh|Wile E\\. Heresiarch|Wilfried Derksen|Willmcw|Woggly|WojPob|Woohookitty|Worldtraveller|Ww|Wwoods|XJamRastafire|Xezbeth|Y0u|Yacht|Zanimum|Zero0000|Zippy|Zocky|Zoe|Zoicon5|Zoney|Zscout370|Zzyzx11)$");
recent2.show_talkpages=true;
recent2.controlUI();
loopRecentChanges(feed, 200);
}
 
Riga 749 ⟶ 791:
}
// re-render the title and accesskeys from existing code in wikibits.js
//akeytt(); //rimosso, non funziona più
return li;
}
Riga 760 ⟶ 802:
window.addMarvin=function() {
var prefix = 'http://' + document.___location.hostname + '/wiki/';
recent2.addToolboxLink(prefix + recent2.filterPage, 'FiltroFiltra dele mudançasultime recentesmodifiche', 'toolbox_filter_changes');
recent2.addToolboxLink(prefix + recent2.allRecentPage, 'TodasTutte asle mudançasultime recentesmodifiche', 'toolbox_all_changes');
recent2.addToolboxLink(prefix + recent2.recentIPPage, 'RecentesUltime ediçõesmodifiche de IPsanonime', 'toolbox_IP_edits');
recent2.addToolboxLink(prefix + recent2.monitorWatchlistPage, 'MonitorizarSegui vigiadosgli osservati speciali', 'toolbox_watchlist_edits');
recent2.addToolboxLink(prefix + recent2.spelldictPage, 'MonitorizarControllo ortografiaortografico', 'toolbox_spelling');
//document.getElementById('toolbox_filter_changes').onclick=marvin;
}
 
recent2.testPage = function (str) {
return RegExp(str.split(/[_ ]/).join('[_ ]'), 'i').test(document.___location.href);
};
Riga 776 ⟶ 818:
if (recent2.testPage(recent2.filterPage)) {
recent2.filter_badwords=true;
} else if (recent2.runOncetestPage(marvin, 1000recent2.allRecentPage);) {
}
else if (recent2.testPage(recent2.allRecentPage)) {
recent2.filter_badwords=false;
} else if (recent2.runOncetestPage(marvin, 1000recent2.recentIPPage);) {
}
else if (recent2.testPage(recent2.recentIPPage)) {
recent2.filter_anonsOnly=true;
} else if (recent2.runOncetestPage(marvin, 1000recent2.monitorWatchlistPage);) {
}
else if (recent2.testPage(recent2.monitorWatchlistPage)) {
recent2.filter_watchlist=true;
} else if (recent2.runOncetestPage(marvin, 1000recent2.spelldictPage);) {
}
else if (recent2.testPage(recent2.spelldictPage)) {
recent2.filter_spelling=true;
} else {
recent2.runOnce(marvin, 1000);
return;
}
setTimeout(marvin, 1000);
}
 
// onload
addOnloadHook(maybeStart);
addOnloadHook(addMarvin);
 
//// testing code
//recent2.filter_badwords=true;
//recent2.filter_spelling=true;
//recent2.runOncesetTimeout(marvin,1000);