From e4884b3dae257d6564c22047ecbab11f10c47dbb Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Fri, 18 Jan 2019 19:50:09 +0000 Subject: [PATCH] Bug fix for direct links --- background.js | 4 ++-- 1 file 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 }) } }