„Szerkesztő:AntiVandal/recent2.js” változatai közötti eltérés

a
nincs szerkesztési összefoglaló
a
a
// -*- mode:java; coding:utf-8 -*-
 
/*
 
 
recent2={
// Edit these to your liking.
// Make sure there's a comma at the end of each line.
badwordsUrl: 'User:AntiVandal/lista',
filterPage: 'User:AntiVandal/Friss',
spelldictUrl: 'User:AntiVandal/Hiba',
spelldictPage: 'User:AntiVandal/Helyes',
}
// leave this alone
dummy: null
};
: window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP")
: false;
}
 
if (x) {
x.onreadystatechange=function() {
onSuccess: recent2.processBadWords, onFailure: function () { recent2.runOnce(recent2.getBadWords, 15000); return true;}});
}
 
recent2.processBadWords=function(d) {
var data=d.responseText.split('\n');
onSuccess: recent2.processWatchlist, onFailure: function () { recent2.runOnce(getWatchlist, 15000); return true; }});
}
recent2.processWatchlist=function(req, bundle) {
var watchlist={};
var lines=req.responseText.split('\n');
window.spellRe=RegExp('<td>[+]</td>\\s*<td .*?>\\s*.*?\\b(' + a.join('|') + ')\\b', 'i');
}
 
 
 
recent2.runOnce=function(f, time) {
default:
if (!newOutputDiv.alerted) {
alert('IsmeretlenUnknown pozícióposition '+position+' ain recent2.js-ben, newOutputDiv');
window.newOutputDiv.alerted=true;
}
recent2.delayedLines={};
recent2.delay=0;
recent2.namespaces={'Media':1, "SpeciálisSpecial":1, "User":1, "User vitatalk":1, "WikipédiaWikipedia":1,
"WikipédiaWikipedia vitatalk":1, "KépImage":1, "KépImage vitatalk":1, "MediaWiki":1,
"MediaWiki vitatalk":1, "SablonTemplate":1, "SablonTemplate vitatalk":1, "SegítségHelp":1,
"SegítségHelp vitatalk":1, "KategóriaCategory":1, "KategóriaCategory vitatalk":1, "PortálPortal":1, "PortálPortal vitatalk":1};
window.processRecentChanges=function(req, bundle){
var initialId=processRecentChanges.id;
var items=doc.getElementsByTagName('item');
var latest=processRecentChanges.lastDate;
for (var i=items.length - 1; i>=0; --i) {
var timestamp = Date.parse(getFirstTagContent(items[i],'pubDate'));
if (timestamp <= processRecentChanges.lastDate) continue;
var diffText=getFirstTagContent(items[i],'description').split('</tr>').join('</tr>\n');
var editSummary=diffText.replace(RegExp('^<p>(.*?)</p>[\\s\\S]*'), '$1');
var editor=getFirstTagContent(items[i], 'creator') || getFirstTagContent(items[i], 'dc:creator');
 
var article=getFirstTagContent(items[i], 'link');
if (recent2.namespaces[namespace]) continue;
}
if (! recent2.show_talkpages && articleTitle && /^VitaTalk:|^[^:]*?[_ ]vitatalk:/.test(articleTitle)) continue;
if (recent2.filter_watchlist && articleTitle &&
! window.watchlist[articleTitle.replace(/^VitaTalk:/, '').replace(/[ _]vitatalk:/, ':')]) continue;
if (recent2.filter_badwords) {
var badMatch=null;
if (window.vandals[editor] > 0) badMatch=['', '', '[valakipreviously másrolled márback visszaállítottathis 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];
// highlighting
badMatch[0]=badMatch[0].split(badWord).join('<span style="background-color: #FF6">'+badWord+'</span>');
editor:editor, diff:diffText, summary:editSummary};
}
 
} /* end for loop */
var output=recent2.getDelayedLineOutput();
else {
for (var i=output.length-1; i>=0; --i) {
outputString+=output[i] + (i>0 ? recent2.outputSeparator : '') ;
}
}
var statusTail=greyFont+'done up to ' + formatTime(latest) + '</font>';
if (processRecentChanges.id > initialId) {
statusTail+=' <a href="javascript:showHideDetailRange(' + initialId + ',' + processRecentChanges.id + ')">részletektoggle megjelenítése/elrejtésethese details</a> |';
if (recent2.autoexpand) {
recent2.runOnce( function() {
}
}
statusTail += ' <a href="javascript:deleteEarlierOutputDivs(' + bundle.status.id + ')">régebbiremove kimenetearlier törléseoutput</a>';
statusTail+='<br>';
bundle.status.innerHTML+=statusTail;
processRecentChanges.lastDate=0;
processRecentChanges.id=0;
 
recent2.getDelayedLineOutput=function() {
var ret=[];
return ret;
}
 
window.deleteEarlierOutputDivs=function(cur) {
for(var i=0; i<outputDivs.length; ++i) {
' (' + linkmaker(bundle.article+'?action=history', 'hist') + ')' +
' ' + linkmaker(bundle.article, bundle.articleTitle) +
( bundle.badWord ? ' találatmatched <b>' + bundle.badWord + '</b> . . ' : ' . . ') +
linkmaker(wikiBase + 'User:' + bundle.editor, bundle.editor) + ' (' +
linkmaker(wikiBase + 'User_vitaUser_talk:' + bundle.editor, 'vitatalk') + ' | ' +
linkmaker(wikiBase + 'User_talk:' + bundle.editor + '?action=edit' +
'&autoedit=s#$#\\n{{sub'+'st:teszttest1-n|' + bundle.articleTitle +
'}}%20~~' + '~~#&autosummary=TesztYour%20recent%20edits',
'warn') + ' | ' +
linkmaker(wikiBase + 'Special:Contributions/' + bundle.editor, 'szerkesztéseicontribs') + ' | ' +
linkmaker(wikiBase + 'Special:Blockip/' + bundle.editor, 'blokkblock') + ') . . ' +
( bundle.summary ? '<i>('+bundle.summary+')</i> . . ' : '') +
'<a href="javascript:showHideDetail(' + bundle.id + ')" id="showdiff_link_' + bundle.id + '">részletekshow details</a>' +
' . . [<a href="javascript:tryRollback(' + bundle.id + ')" class="recent2_rollback">visszaállításrollback</a>]' +
'<p><div id="diff_div_' + bundle.id + '" style="display: none">' +
'</div></li>' +
else { window.vandals[vandal]++; }
return b;
}
 
var onSuccess=function (x, bundle) {
var rollRe=RegExp('<a href="(/w/index.php[^"]*?action=rollback[^"]*?from=([^&]*)[^"]*?)".*?<br />(<span[^>]*>)?(.*?)(</span>)?<br />[^<>]*?</td>');
// match[0]: useless
// match[1]: url (escaped)
// match[2]: last editor (escaped)
// match[4]: last edit summary (wikiText - FIXME strip this to plain text)
var match=rollRe.exec(x.responseText);
if (!match) {
alert('Nem találtam visszaállítás linket.\nA visszaállítás csak az adminok számára elérhető.');
return;
}
var lastEditor=match[2].split('+').join(' ');
var lastSummary=match[4];
// var vandal=b.editor; // from the closure
if (lastEditor != vandal) {
var summary=lastSummary.replace(RegExp('<[^>]*?>','g'),'');
if (!summary) summary=lastSummary;
alert( 'Nem lehet visszaállítani - Valaki más szerkesztette a vandál óta.\n\nPage: '+ b.articleTitle +
'\nVandal: '+vandal+'\nLast editor: '+lastEditor+'\nEdit summary: '+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;
}
recent2.download({ url:b.url, onSuccess: onSuccess, id: b.id, onFailure:onFailure});
}
 
return null;
}
 
 
recent2.doPopups=function(div) {
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='részletekhide elrejtésedetails'; }
else { div.style.display='none'; lk.innerHTML='részletekshow details'; }
}
recent2.controls=newOutputDiv('recent2.controls', 'top', true);
recent2.controls.newline = function(){ recent2.controls.appendChild(document.createElement('br')); };
recent2.newCheckbox('VitalapokIgnore kihagyásatalk pages', !recent2.show_talkpages,
function() { recent2.show_talkpages=!this.checked; },
'talk');
recent2.controls.newline();
recent2.newCheckbox('CsakIgnore szócikkekpages outside the article namespace', false,
function() { recent2.hideNonArticles = this.checked; },
'hidenonarticles');
recent2.controls.newline();
recent2.newCheckbox('ÚjAutomatically tartalomexpand automatikusnew kifejtésecontent', recent2.autoexpand,
function() { recent2.autoexpand = this.checked; },
'autoexpand');
recent2.controls.newline();
recent2.newCheckbox('CsakOnly ashow 4edits frissítésunchanged utánafter változatlanfour tartalomupdates', false,
function() { recent2.delay = (this.checked) ? 4 : 0; },
'delayby4');
}
window.marvin=function() {
// this isn't really used (not accessible from the UI), so don't worry about it
window.sysops=RegExp("^(Burumbátor|Dhanak|grin|KovacsUr|nagytibi|NCurse|nyenyec|Serinde|tgr)$");
recent2.show_talkpages=true;
window.addMarvin=function() {
var prefix = 'http://' + document.location.hostname + '/wiki/';
recent2.addToolboxLink(prefix + recent2.filterPage, 'FrissFilter változtatásokrecent szűrésechanges', 'toolbox_filter_changes');
recent2.addToolboxLink(prefix + recent2.allRecentPage, 'MindenAll frissrecent szerkesztéschanges', 'toolbox_all_changes');
recent2.addToolboxLink(prefix + recent2.recentIPPage, 'LegutóbbiRecent anonimIP szerkesztésekedits', 'toolbox_IP_edits');
recent2.addToolboxLink(prefix + recent2.monitorWatchlistPage, 'FigyelőlistaMonitor szűrésemy watchlist', 'toolbox_watchlist_edits');
recent2.addToolboxLink(prefix + recent2.spelldictPage, 'HelyesírásLive spellcheck', 'toolbox_spelling');
//document.getElementById('toolbox_filter_changes').onclick=marvin;
}
 
recent2.testPage = function (str) {
return RegExp(str.split(/[_ ]/).join('[_ ]'), 'i').test(document.location.href);
window.maybeStart=function() {
var loc=document.location.href;
if (recent2.testPage(recent2.filterPage)) {
recent2.filter_badwords=true;
recent2.runOnce(marvin, 1000);
addOnloadHook(addMarvin);
 
//// testing code
//recent2.filter_badwords=true;
//recent2.filter_spelling=true;
//recent2.runOnce(marvin,1000);
 
 
// </nowiki></pre>
86

szerkesztés