Sixtest Wiki:API5/Edit

(function {	"use strict";	$API("Project:API5/Edit", function (edit) { var settings = {}, init; edit.extend({			submit: function {				var edits;				if ($API.user.right('edit')) {					edits = $API.ext.Array.clone($API.user.changed);					$API.user.changed = {};					$API.ext.Ajax.update(edits || {});				}			},			set: function (setting, value) {				if (settings[setting] !== undefined) {					settings[setting] = value;					return true;				}				return false;			},			get: function (setting) {				return settings[setting];			},			setNew: function (setting, value) {				settings[setting] = value;			}		}); edit.set("editright", Array.prototype.indexOf.call(wgUserGroups, 'sysop') !== -1); }); });