normalize moto module header
This commit is contained in:
parent
9b1460e3cd
commit
8927501eca
11 changed files with 40 additions and 42 deletions
|
|
@ -4,14 +4,12 @@
|
|||
|
||||
(function() {
|
||||
|
||||
if (!self.moto) self.moto = {};
|
||||
if (self.moto.Ajax) return;
|
||||
let moto = self.moto = self.moto || {};
|
||||
if (moto.Ajax) return;
|
||||
|
||||
const MOTO = self.moto;
|
||||
moto.Ajax = Ajax;
|
||||
|
||||
MOTO.Ajax = Ajax;
|
||||
|
||||
MOTO.callAjax = function(url, handler) {
|
||||
moto.callAjax = function(url, handler) {
|
||||
new Ajax(handler).request(url);
|
||||
};
|
||||
|
||||
|
|
@ -21,7 +19,7 @@
|
|||
TIME = function() { return new Date().getTime() },
|
||||
MOKEY = moto.id = KV.getItem(KEY) || (TIME().toString(36)+rnd()+rnd());
|
||||
|
||||
MOTO.restore = function(id) {
|
||||
moto.restore = function(id) {
|
||||
MOKEY = moto.id = id;
|
||||
KV.setItem(KEY, MOKEY);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue