Fixed Firefox notification issue

This commit is contained in:
Ajay Ramachandran
2019-07-30 18:15:49 -04:00
parent 10d1978566
commit 74affbd9c0
2 changed files with 10 additions and 1 deletions

View File

@@ -3,6 +3,9 @@ var previousVideoID = null
//the id of this user, randomly generated once per install
var userID = null;
//the last video id loaded, to make sure it is a video id change
var sponsorVideoID = null;
//when a new tab is highlighted
chrome.tabs.onActivated.addListener(
function(activeInfo) {
@@ -162,6 +165,12 @@ function videoIDChange(currentVideoID, tabId) {
id: currentVideoID
});
//not a url change
if (sponsorVideoID == currentVideoID){
return;
}
sponsorVideoID = currentVideoID;
//warn them if they had unsubmitted times
if (previousVideoID != null) {
//get the sponsor times from storage