From 301e16b8f13bdf060e99acb9f60b9d65e33bc8de Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Thu, 8 Aug 2019 19:25:29 +0100 Subject: [PATCH] Removed tabUpdate as detecting in contentscript --- background.js | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/background.js b/background.js index 9640bec5..adafe098 100644 --- a/background.js +++ b/background.js @@ -1,24 +1,8 @@ //the id of this user, randomly generated once per install var userID = null; -//when a new tab is highlighted -chrome.tabs.onActivated.addListener( - function(activeInfo) { - chrome.tabs.get(activeInfo.tabId, function(tab) { - tabUpdate(activeInfo.tabId); - }) - } -); - -//when a tab changes URLs -chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { - if (changeInfo != undefined) { - //if URL changed - if (tabId) { - tabUpdate(tabId); - } - } -}); +//the last video id loaded, to make sure it is a video id change +var sponsorVideoID = null; chrome.runtime.onMessage.addListener(function (request, sender, callback) { if (request.message == "submitTimes") { @@ -164,13 +148,6 @@ function submitTimes(videoID, callback) { }); } -function tabUpdate(tabId) { - //send a message to the content script - chrome.tabs.sendMessage(tabId, { - message: 'update' - }); -} - function getUserID(callback) { if (userID != null) { callback(userID);