User:Cresbot/excgChanges.js

/** * Gets non-bot exchange edits since a certain date, typically from when it was last checked * * @author Cqm */

( new mw.Api ) .get( {		action: 'query',		list: 'recentchanges',		rcshow: '!bot',		rcnamespace: '112',		rcend: '20150112231800',		rclimit: 'max'	} ) .done( function ( data ) {		var changes = data.query.recentchanges;

if ( !changes.length ) { alert( 'No non-bot exchange changes found.' ); }

changes.forEach( function ( elem ) {			var id = elem.revid,				url = mw.config.get( 'wgServer' ) + '/?diff=' + id;

if ( ['edit', 'new'].indexOf( elem.type ) > -1 ) { window.open( url ); }		} );	} );