Skip to content

Commit

Permalink
Fix scriptStop
Browse files Browse the repository at this point in the history
  • Loading branch information
Elements6007 committed Apr 12, 2023
1 parent 1142af0 commit e4668e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion background.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ chrome.tabs.onUpdated.addListener((tabId, tab) => {
chrome.tabs.sendMessage(tabId, {
type: "NEW"
});
}
} else {
chrome.tabs.sendMessage(tabId, {
type: "no"
});
}
});
2 changes: 2 additions & 0 deletions contentScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@

if (type === "NEW") {
videosLoaded();
} else if (type === "no") {
scriptStop();
}

});
Expand Down

0 comments on commit e4668e8

Please sign in to comment.