Update background.js

This commit is contained in:
Official Noob 2019-01-15 19:01:37 +00:00 committed by GitHub
parent a229b645e3
commit 9011da564a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,9 @@
chrome.tabs.onUpdated.addListener(
function(tabId, changeInfo, tab) {
if (youtube_parser(changeInfo.url)) {
if (changeInfo.url) {
chrome.tabs.sendMessage( tabId, {
message: 'ytvideo',
url: changeInfo.url
message: 'ytvideoid',
id: youtube_parser(changeInfo.url)
})
}
}