From 280e9cfa626f5aaeff3705f8843050cf9800d211 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Thu, 9 May 2019 21:10:26 +0200 Subject: [PATCH] minor fixes --- src/ext/uw-bg.js | 12 +++++++----- src/options/options.html | 2 +- src/popup/App.vue | 2 ++ yarn.lock | 5 ----- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/ext/uw-bg.js b/src/ext/uw-bg.js index 2649734..2dad303 100644 --- a/src/ext/uw-bg.js +++ b/src/ext/uw-bg.js @@ -53,7 +53,6 @@ class UWServer { } scheduleGc(timeout) { - console.log("scheduling gcframe") if (this._gctimeout) { return; } @@ -122,19 +121,22 @@ class UWServer { async gcFrames() { // does "garbage collection" on frames + let frames; if (BrowserDetect.firefox) { frames = await browser.webNavigation.getAllFrames({tabId: this.currentTabId}); } else if (BrowserDetect.chrome) { frames = await new Promise( (resolve, reject) => { - chrome.webNavigation.getAllFrames({tabId: this.currentTabId}, (data) => resolve(data) ); + chrome.webNavigation.getAllFrames({tabId: this.currentTabId}, (data) => {resolve(data); return true}); }); } - for (let key in this.videoTabs[this.currentTabId].frames) { - if (! frames.find(x => x.frameId == key)) { - delete this.videoTabs[this.currentTabId].frames[key]; + if (this.videoTabs[this.currentTabId]) { + for (let key in this.videoTabs[this.currentTabId].frames) { + if (! frames.find(x => x.frameId == key)) { + delete this.videoTabs[this.currentTabId].frames[key]; + } } } } diff --git a/src/options/options.html b/src/options/options.html index 3fe974f..58247d6 100644 --- a/src/options/options.html +++ b/src/options/options.html @@ -2,7 +2,7 @@ - ultravidify-vue - Options + Ultravidify - Options <% if (NODE_ENV === 'development') { %> diff --git a/src/popup/App.vue b/src/popup/App.vue index 969fe39..14f8e29 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -235,6 +235,8 @@ export default { this.performance[key] = message.message[key]; } } + + return true; }, loadFrames(videoTab) { if (videoTab.selected) { diff --git a/yarn.lock b/yarn.lock index ac9b70b..31613ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5598,11 +5598,6 @@ web-ext-types@^2.1.0: resolved "https://registry.yarnpkg.com/web-ext-types/-/web-ext-types-2.3.0.tgz#3d7e62d82f272e3d6056be2e0f92e8036651f7e0" integrity sha512-a0tUp0fQXUgGH53TuXienngvqSkiNs3xDpSIA4U5+c+AfFiniNh+YMVrVcLgFTIXRyIeFkpYZe8IzwiuULomAg== -webextension-polyfill@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.3.1.tgz#fab2aed917a713a5d8221e41febad81c5d0b080f" - integrity sha512-ISB42vlgMyM7xE1u6pREeCqmmXjLsYu/nqAR8Dl/gIAnylb+KpRpvKbVkUYNFePhhXn0Obkkc3jasOII9ztUtg== - webpack-chrome-extension-reloader@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/webpack-chrome-extension-reloader/-/webpack-chrome-extension-reloader-0.8.3.tgz#cbe87829d026f23f85e68e0d929e9815f6ccd532"