summaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-04-04 17:39:26 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2020-04-05 19:57:37 +0300
commit0d76cef43437fda336a3314dc62db1388537042f (patch)
tree529ab1634c1d0ca9a51e1060113b43571e49b9da /ext/fg/js
parente4fc53480f36b56abba0ab1cb20f6aad7bf4a004 (diff)
give a name to a timeout
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/popup-proxy.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js
index cb264af2..7405b552 100644
--- a/ext/fg/js/popup-proxy.js
+++ b/ext/fg/js/popup-proxy.js
@@ -121,7 +121,7 @@ class PopupProxy {
async _updateFrameOffset() {
const firstRun = this._frameOffsetUpdatedAt === null;
- const expired = firstRun || this._frameOffsetUpdatedAt < Date.now() - 1000;
+ const expired = firstRun || this._frameOffsetUpdatedAt < Date.now() - PopupProxy._frameOffsetExpireTimeout;
if (this._frameOffsetPromise === null && !expired) { return; }
if (this._frameOffsetPromise !== null) {
@@ -158,3 +158,5 @@ class PopupProxy {
return [x + offsetX, y + offsetY];
}
}
+
+PopupProxy._frameOffsetExpireTimeout = 1000;