diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/vapi-client.js | 6 | ||||
-rw-r--r-- | js/vapi-common.js | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/js/vapi-client.js b/js/vapi-client.js index 4c48d03..aeddd81 100644 --- a/js/vapi-client.js +++ b/js/vapi-client.js @@ -26,6 +26,12 @@ 'use strict'; (function (self) { + if (self.vAPI === undefined) { + self.vAPI = {}; + } + + let vAPI = self.vAPI; + vAPI.sessionId = String.fromCharCode(Date.now() % 25 + 97) + Math.random().toString(36).slice(2); diff --git a/js/vapi-common.js b/js/vapi-common.js index 6a79096..5304e5a 100644 --- a/js/vapi-common.js +++ b/js/vapi-common.js @@ -31,6 +31,10 @@ const {classes: Cc, interfaces: Ci, utils: Cu} = Components; Cu.import('resource://gre/modules/Services.jsm'); (function (self) { + if (self.vAPI === undefined) { + self.vAPI = vAPI; + } + vAPI.setTimeout = vAPI.setTimeout || function (callback, delay, extra) { return setTimeout(function (a) { callback(a); |