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

Contenuto cancellato Contenuto aggiunto
ok
parolacce
Riga 16:
// Edit these to your liking.
// Make sure there's a comma at the end of each line.
badwordsUrlparolaccesUrl: 'User:Senpai/parolacce',
filterPage: 'User:Lupin/Filter_recent_changes',
Pagine più recenti: 'User:Lupin/All_recent_changes',
Riga 53:
}
 
window.gettingBadWordsgettingParolacce=false;
window.badWordsparolacce=null;
 
recent2.getBadWordsgetParolacce=function() {
window.gettingBadWordsgettingParolacce=true;
recent2.download({ url: 'http://' + document.___location.hostname +
'/w/index.php?title=' + recent2.badwordsUrlParolacceUrl + '&action=raw&ctype=text/css',
onSuccess: recent2.processBadWordsprocessParolacce, onFailure: function () { setTimeout(recent2.getBadWordsgetParolacce, 15000); return true;}});
}
 
recent2.processBadWordsprocessParolacce=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.badwordsUrlparolacceUrl + '">badwordsparolacce</a>:<pre>' + s + '</pre>';
continue;
}
Riga 87:
// 123 3 2| 4 415 5
// ((( repeatedchar ) )| ( ... | ... | ... ))( bdy )
window.badWordsparolacce=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.badWordsparolacce && recent2.filter_badwordsfilter_parolacce ) {
if ( ! window.gettingBadWordsgettingParolacce ) { recent2.getBadWordsgetParolacce(); }
return setTimeout(function(){grabRecentChanges(feed);}, 500);
}
Riga 250:
if (recent2.filter_watchlist && articleTitle &&
! window.watchlist[articleTitle.replace(/^Talk:/, '').replace(/[ _]talk:/, ':')]) continue;
if (recent2.filter_badwordsfilter_parolacce) {
var badMatch=null;
if (window.vandals[editor] > 0) { badMatch=['', '', '[previously rolled back this editor]']; }
else { badMatch=badWordsparolacce.test(diffText); }// .test() is meant to be faster than a full match
if (badMatch) {
if (badMatch===true) { badMatch=diffText.match(badWordsparolacce); }
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_badwordsfilter_parolacce=true;
} else if (recent2.testPage(recent2.allRecentPage)) {
recent2.filter_badwordsfilter_parolacce=false;
} else if (recent2.testPage(recent2.recentIPPage)) {
recent2.filter_anonsOnly=true;
Riga 800:
 
//// testing code
//recent2.filter_badwordsfilter_parolacce=true;
//recent2.filter_spelling=true;
//setTimeout(marvin,1000);