diff --git a/src/ext/uw-bg.js b/src/ext/uw-bg.js index 550e5ee..42cd0ce 100644 --- a/src/ext/uw-bg.js +++ b/src/ext/uw-bg.js @@ -56,8 +56,6 @@ class UWServer { } else if (BrowserDetect.chrome) { chrome.tabs.onActivated.addListener(function(m) {ths.onTabSwitched(m)}); } - - this.scheduleGc(); } async _promisifyTabsGet(browserObj, tabId){ @@ -97,23 +95,6 @@ class UWServer { } } - scheduleGc(timeout) { - if (this._gctimeout) { - return; - } - if (!timeout) { - timeout = 0; - } - - const ths = this; - setTimeout( () => { - clearTimeout(ths._gctimeout); - ths.gcFrames(); - - ths._gctimeoutgcTimeout = ths.scheduleGc(5000); - }, timeout); - } - extractHostname(url){ var hostname; @@ -157,28 +138,6 @@ class UWServer { //TODO: change extension icon based on whether there's any videos on current page } - 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); return true}); - }); - } - - 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]; - } - } - } - } - registerVideo(sender) { this.logger.log('info', 'comms', '[UWServer::registerVideo] Registering video.\nsender:', sender); diff --git a/src/manifest.json b/src/manifest.json index 82efb71..6ffb2c9 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -59,8 +59,7 @@ "permissions": [ "storage", "activeTab", - "", - "webNavigation" + "" ], "optional_permissions": [ "downloads"