Skip to content

Commit

Permalink
Create background.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NDevTK authored Apr 16, 2019
1 parent 42ea566 commit 4565959
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
chrome.tabs.onUpdated.addListener( // On tab update
function(tabId, changeInfo, tab) {
if (changeInfo.url) { // If URL changed message ContentScript the video id
chrome.tabs.sendMessage( tabId, {
message: 'update'
})
}
}
);

0 comments on commit 4565959

Please sign in to comment.