From 0d76cef43437fda336a3314dc62db1388537042f Mon Sep 17 00:00:00 2001 From: siikamiika Date: Sat, 4 Apr 2020 17:39:26 +0300 Subject: give a name to a timeout --- ext/fg/js/popup-proxy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ext/fg') 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; -- cgit v1.2.3