From d25792f39a86017529746338436efb10c7bab444 Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Sun, 4 Aug 2019 19:07:00 +0100 Subject: [PATCH] Removed getYouTubeVideoID --- popup.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/popup.js b/popup.js index 8368f274..d1186984 100644 --- a/popup.js +++ b/popup.js @@ -1127,13 +1127,6 @@ function runThePopup() { xmlhttp.send(); } - function getYouTubeVideoID(url) { // Returns with video id else returns false - var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; - var match = url.match(regExp); - var id = new URL(url).searchParams.get("v"); - return (match && match[7].length == 11) ? id : false; - } - //end of function } @@ -1143,4 +1136,4 @@ if (chrome.tabs != undefined) { //this means it is actually opened in the popup runThePopup(); -} \ No newline at end of file +}