var nonconfirmededits={
/* This script is used to add a link to [[Special:RandomRootpage]], or to a stub article.
// Edit these to your liking.
// Make sure there's a comma at the end of each line.
*/
recentnoncomfirmedPage: 'User:Anchorvale/Recent_Non_Confirmed_Edits',
linkify: true,
mw.loader.using( [ 'mediawiki.util' ], function () {
updateSeconds: 20,
mw.util.addPortletLink(
// FIXME: Use <ul> and add a border to each <li>'s
'p-navigation',
outputSeparator: '<hr>',
mw.util.getUrl( 'Special:RandomRootpage' ),
apiAulimitUser: 500,
'Random rootpage',
apiAulimitSysop: 5000,
'n-randomrootpage',
backgroundWindowsMax: 10,
'Load a random rootpage',
// leave this last one alone
'i',
dummy: null
'#n-sitesupport'
};
);
window.addMarvin=function() {
} );
mw.util.addPortletLink( 'p-tb', mw.util.getUrl( nonconfirmededits.recentnonconfirmedPage ),
mw.msg( 'avt-ip-rc' ), 'toolbox_Non_confirmed_edits');
/* [[Category:Wikipedia scripts]]
};
*/
window.maybeStart=function() {
switch (mw.config.get('wgPageName')) {
case nonconfirmededits.recentIPPage:
nonconfirmededits.filter_anonsOnly=true;
return;
}
setTimeout(marvin, 1000);
window.processRecentChangesSingle=function(){
NonConfirmedEdits.itemsCurrent--;
var i = NonConfirmedEdits.itemsCurrent;
var items = NonConfirmedEdits.items;
if (i < 0) { processRecentChangesDisplay(NonConfirmedEdits.bundleRef); return; }
var timestamp = Date.parse(getFirstTagContent(items[i],'pubDate'));
if (timestamp <= processRecentChanges.lastDate) { nextChangeSoon(true); return; }
NonConfirmedEdits.latest = (timestamp > NonConfirmedEdits.latest) ? timestamp : NonConfirmedEdits.latest;
var diffText=getFirstTagContent(items[i],'description').split('</tr>').join('</tr>\n');
var editSummary=diffText.replace( /^<p>(.*?)<\/p>[\s\S]*/, '$1');
var editor=getFirstTagContent(items[i], 'creator') || getFirstTagContent(items[i], 'dc:creator');
if (NonConfirmedEdits.ignore_my_edits && mw.config.get('wgUserName')==editor) { return; }
var article;
var articleTitle;
// NB article is the link attribute - a fully qualified URL
// strip out the &diff=...&oldid=... bit to leave only ?title=...
article=getFirstTagContent(items[i], 'link').split('&')[0];
if (NonConfirmedEdits.delayedLines[article] && NonConfirmedEdits.delayedLines[article].editor != editor) {
delete NonConfirmedEdits.delayedLines[article];
}
if (NonConfirmedEdits.filter_anonsOnly && !mw.util.isRegistered(editor)) {
nextChangeSoon(true);
return;
}
};
window.processRecentChangesSingle=function(){
NonConfirmedEdits.itemsCurrent--;
var i = NonConfirmedEdits.itemsCurrent;
var items = NonConfirmedEdits.items;
if (i < 0) { processRecentChangesDisplay(NonConfirmedEdits.bundleRef); return; }
var timestamp = Date.parse(getFirstTagContent(items[i],'pubDate'));
if (timestamp <= processRecentChanges.lastDate) { nextChangeSoon(true); return; }
NonConfirmedEdits.latest = (timestamp > NonConfirmedEdits.latest) ? timestamp : NonConfirmedEdits.latest;
var diffText=getFirstTagContent(items[i],'description').split('</tr>').join('</tr>\n');
var editSummary=diffText.replace( /^<p>(.*?)<\/p>[\s\S]*/, '$1');
var editor=getFirstTagContent(items[i], 'creator') || getFirstTagContent(items[i], 'dc:creator');
if (NonConfirmedEdits.ignore_my_edits && mw.config.get('wgUserName')==editor) { return; }
var article;
var articleTitle;
// NB article is the link attribute - a fully qualified URL
// strip out the &diff=...&oldid=... bit to leave only ?title=...
article=getFirstTagContent(items[i], 'link').split('&')[0];
if (NonConfirmedEdits.delayedLines[article] && NonConfirmedEdits.delayedLines[article].editor != editor) {
delete NonConfirmedEdits.delayedLines[article];
}
if (NonConfirmedEdits.filter_anonsOnly && !mw.util.isIPAddress(editor)) {
nextChangeSoon(true);
return;
}
};
};
/* [[Category:Wikipedia scripts]]
*/
|