User:Jorgenev/AJAXSectionEditor.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 29:
if ( data.edit && data.edit.result == 'Success' ) {
cancel();
window.___location.reload(); // reload page if edit was successful
 
$.get('http://en.wikipedia.org/w/index.php?action=render&title='+PageName, function(data) {
document.getElementById("bodyContent").innerHTML = document.getElementById("bodyContent").innerHTML.split("<!-- bodytext -->")[0] + data;
});
 
} else if ( data.error ) {
alert( 'Error: API returned error code' + data.error.code + ' with info ' + data.error.info );