From afaf6aff9b48b31bb6947fb5fb76287a419bd388 Mon Sep 17 00:00:00 2001 From: Deathamns Date: Sun, 8 Feb 2015 19:34:28 +0100 Subject: [PATCH] vAPI.sessionId, element-picker dialog as iframe vAPI.sessionId - random ID generated every time when a page loads. Having the dialog in an iframe lowers the chance of interference with the styling of the page, also avoids using innerHTML (AMO complaint). --- platform/firefox/vapi-client.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/firefox/vapi-client.js b/platform/firefox/vapi-client.js index c9caa85..2d35b2e 100644 --- a/platform/firefox/vapi-client.js +++ b/platform/firefox/vapi-client.js @@ -31,8 +31,10 @@ /******************************************************************************/ -self.vAPI = self.vAPI || {}; +var vAPI = self.vAPI = self.vAPI || {}; vAPI.firefox = true; +vAPI.sessionId = String.fromCharCode(Date.now() % 25 + 97) + + Math.random().toString(36).slice(2); /******************************************************************************/