From 2a30d9c57c9065ef5a6e00e993ab2c38915aadf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Sat, 21 Sep 2019 11:52:19 -0500 Subject: Revert some initialization stuff --- js/vapi-client.js | 6 ++++++ js/vapi-common.js | 4 ++++ 2 files changed, 10 insertions(+) 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); -- cgit v1.2.3