User:ExtorcDev/rmMaster.js: Difference between revisions

Content deleted Content added
ExtorcDev (talk | contribs)
No edit summary
ExtorcDev (talk | contribs)
No edit summary
Line 110:
});
 
function editPage( urlloc , resultadition , action) {
var api2 = new mw.Api();
api2.postWithToken("csrf", editParams(urlloc, addition, action) ).done(function( data ) {
alert( 'Page edited!' );
} ).fail( function(code, data) {
Line 120:
 
function queryParams(loc){ return { action: 'query', prop: 'revisions', rvprop: 'content', rvlimit: 1, titles: loc }; }
function editParams(loc, addition, action){ return { action: 'edit', title: loc, text: resultaddition, summary: action + ' Request using [[User:ExtorcDev/rmMaster.js|rmMaster]]' }; }