diff options
author | Jesús <heckyel@hyperbola.info> | 2019-09-21 11:54:56 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-09-21 11:54:56 -0500 |
commit | 6f300357e247ce0645acdff25d2f0b1c056d3ae1 (patch) | |
tree | 149d3c7e4ff7743bafc845ce978b2eb2eeb1e035 | |
parent | 2a30d9c57c9065ef5a6e00e993ab2c38915aadf3 (diff) | |
download | ematrix-6f300357e247ce0645acdff25d2f0b1c056d3ae1.tar.lz ematrix-6f300357e247ce0645acdff25d2f0b1c056d3ae1.tar.xz ematrix-6f300357e247ce0645acdff25d2f0b1c056d3ae1.zip |
Polyfill setTimeout if missing from vAPI
-rw-r--r-- | js/vapi-client.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/vapi-client.js b/js/vapi-client.js index aeddd81..68da828 100644 --- a/js/vapi-client.js +++ b/js/vapi-client.js @@ -32,6 +32,12 @@ let vAPI = self.vAPI; + vAPI.setTimeout = vAPI.setTimeout || function (callback, delay, extra) { + return setTimeout(function (a) { + callback(a); + }, delay, extra); + }; + vAPI.sessionId = String.fromCharCode(Date.now() % 25 + 97) + Math.random().toString(36).slice(2); |