User:Cmorse/Notebook/MediaWiki for Open Science/2009/01/29
From OpenWetWare
Main project page Next entry | |
Checking if a new revision of the page has been created when loading autosaved versioneSJK 01:35, 30 January 2009 (EST)
if(this.data[this.page]['rev'] != wgCurRevisionId) { alert('this page has changed since you started editing it'); } else { alert('this page has not chagned since you started editing it') } add: function(key, val) { this.data[this.page][key] = val; this.data[this.page]['rev'] = wgCurRevisionId; }, Note: Mediawiki still picks up issues with revision conflicts even without the plugin detecting them. But this allows them to be seen long before the page is saved. Hopefully mitigating any possible issues. |