aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-09-21 11:52:19 -0500
committerJesús <heckyel@hyperbola.info>2019-09-21 11:52:19 -0500
commit2a30d9c57c9065ef5a6e00e993ab2c38915aadf3 (patch)
treed36a12ac1c4beb969d3ad11c971356a1a2a5dd14 /js
parentf31fb021b614be7dc212fdebae5926b2b35e2ef4 (diff)
downloadematrix-2a30d9c57c9065ef5a6e00e993ab2c38915aadf3.tar.lz
ematrix-2a30d9c57c9065ef5a6e00e993ab2c38915aadf3.tar.xz
ematrix-2a30d9c57c9065ef5a6e00e993ab2c38915aadf3.zip
Revert some initialization stuff
Diffstat (limited to 'js')
-rw-r--r--js/vapi-client.js6
-rw-r--r--js/vapi-common.js4
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);