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

Contenuto cancellato Contenuto aggiunto
edit
Riga 16:
// Edit these to your liking.
// Make sure there's a comma at the end of each line.
parolaccesUrlbadwordsUrl: 'User:SenpaiLupin/parolaccebadwords',
filterPage: 'User:Lupin/Filter_recent_changes',
Pagine più recentiallRecentPage: 'User:Lupin/All_recent_changes',
Edit più recenti di IPrecentIPPage: 'User:Lupin/Recent_IP_edits',
Monitor pagine osservatemonitorWatchlistPage: 'User:Lupin/Monitor_my_watchlist',
spelldictUrl: 'Wikipedia:Lists_of_common_misspellings/For_machines',
spelldictPage: 'User:Lupin/Live_spellcheck',
Riga 53:
}
 
window.gettingParolaccegettingBadWords=false;
window.parolaccebadWords=null;
 
recent2.getParolaccegetBadWords=function() {
window.gettingParolaccegettingBadWords=true;
recent2.download({ url: 'http://' + document.___location.hostname +
'/w/index.php?title=' + recent2.ParolacceUrlbadwordsUrl + '&action=raw&ctype=text/css',
onSuccess: recent2.processParolacceprocessBadWords, onFailure: function () { setTimeout(recent2.getParolaccegetBadWords, 15000); return true;}});
}
 
recent2.processParolacceprocessBadWords=function(d) {
var data=d.responseText.split('\n');
var ret=[];
Riga 76:
var errDiv=newOutputDiv('recent2_error', recent2.outputPosition);
errDiv.innerHTML='Warning: ignoring odd-looking regexp on line '+i
+' of <a href="/wiki/' + recent2.parolacceUrlbadwordsUrl + '">parolaccebadwords</a>:<pre>' + s + '</pre>';
continue;
}
Riga 87:
// 123 3 2| 4 415 5
// ((( repeatedchar ) )| ( ... | ... | ... ))( bdy )
window.parolaccebadWords=RegExp("<td>[+]</td>\\s*<td .*?>\\s*.*?((([^-{}.\\s'=wI:*#0-9A-F])\\3{2,})|[^/]\\b(" + ret.join('|') + "))(\\b[^/]|[|]).*\\s*</td>", 'im');
}
 
Riga 164:
 
window.grabRecentChanges=function(feed) {
if (! window.parolaccebadWords && recent2.filter_parolaccefilter_badwords ) {
if ( ! window.gettingParolaccegettingBadWords ) { recent2.getParolaccegetBadWords(); }
return setTimeout(function(){grabRecentChanges(feed);}, 500);
}
Riga 250:
if (recent2.filter_watchlist && articleTitle &&
! window.watchlist[articleTitle.replace(/^Talk:/, '').replace(/[ _]talk:/, ':')]) continue;
if (recent2.filter_parolaccefilter_badwords) {
var badMatch=null;
if (window.vandals[editor] > 0) { badMatch=['', '', '[previously rolled back this editor]']; }
else { badMatch=parolaccebadWords.test(diffText); }// .test() is meant to be faster than a full match
if (badMatch) {
if (badMatch===true) { badMatch=diffText.match(parolaccebadWords); }
articleTitle=getFirstTagContent(items[i], 'title');
var badWord=badMatch[2] || badMatch[4];
Riga 780:
var loc=document.___location.href;
if (recent2.testPage(recent2.filterPage)) {
recent2.filter_parolaccefilter_badwords=true;
} else if (recent2.testPage(recent2.allRecentPage)) {
recent2.filter_parolaccefilter_badwords=false;
} else if (recent2.testPage(recent2.recentIPPage)) {
recent2.filter_anonsOnly=true;
Riga 800:
 
//// testing code
//recent2.filter_parolaccefilter_badwords=true;
//recent2.filter_spelling=true;
//setTimeout(marvin,1000);