aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOfficial Noob <[email protected]>2019-01-18 19:50:09 +0000
committerGitHub <[email protected]>2019-01-18 19:50:09 +0000
commite4884b3dae257d6564c22047ecbab11f10c47dbb (patch)
treeee21c8ed7a7652df1107302a73e628025075ff76
parente5ee77bf369c30c8b23ecfa7496d75503be5ef56 (diff)
downloadSponsorBlock-e4884b3dae257d6564c22047ecbab11f10c47dbb.tar.gz
SponsorBlock-e4884b3dae257d6564c22047ecbab11f10c47dbb.zip
Bug fix for direct links
-rw-r--r--background.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/background.js b/background.js
index c34ded69..924b2d31 100644
--- a/background.js
+++ b/background.js
@@ -1,9 +1,9 @@
chrome.tabs.onUpdated.addListener(
function(tabId, changeInfo, tab) {
- if (changeInfo.url) {
+ if (changeInfo.url && id = youtube_parser(changeInfo.url)) {
chrome.tabs.sendMessage( tabId, {
message: 'ytvideoid',
- id: youtube_parser(changeInfo.url)
+ id: id
})
}
}