MediaWiki:Gadget-PurgeOnEdit.js

/* Automatically purge page cache after editing a page. This is a workaround for Cargo template queries not rendering HTML after a page edit.

Requires the `purge` user group right, so only works for logged-in editors. if(mw.config.get('wgPostEdit')) { var api = new mw.Api; api.post({	 action: 'purge',	  titles: mw.config.get('wgPageName')	}).done(function(data) {	  console.log('Page cache purged.');	}); }