MediaWiki:LAPI.js: Difference between revisions

Content deleted Content added
upgrade LAPI
m Adapt for MW1.17
Line 1,356:
if (!the_form) throw new Error ('#Server reply does not contain mandatory form.');
}
if (window.mediaWiki) { // MW 1.17+
revision_id = request.responseText.match (/wgCurRevisionId\s*=\s*(\d+)[;,]/);
revision_id = request.responseText.match (/mediaWiki.config.set\(\{.*"wgCurRevisionId"\s*:\s*(\d+),/);
} else { // MW < 1.17
revision_id = request.responseText.match (/wgCurRevisionId\s*=\s*(\d+)[;,]/);
}
if (revision_id) revision_id = parseInt (revision_id[1], 10);
} catch (ex) {