Board Thread:Support Requests - Getting Technical/@comment-26847884-20140529165540/@comment-24676365-20140530002116

Lil' Miss Rarity wrote:  //Simple page edit $.ajax({   url: mw.util.wikiScript("api"),    type: "POST",    dataType: "JSON",    data: {        action: "edit",        title: "User:Rinzler135",        summary: "API edit!",        text: "Test API edit!",        token: mw.user.tokens.values.editToken,        format: "json"    } }).done(funtion(data) {    if (data && data.edit && data.edit.result == "Success") {        alert("Edit successful!");    } else if (data && data.error) {        alert( 'Error: API returned error code "' + data.error.code + '": ' + data.error.info );    } else {        alert( 'Error: Unknown result from API.' );    } }); Learn