From e6fa832cb86593499f4c9d3f219d776710d8fd3a Mon Sep 17 00:00:00 2001 From: Official Noob <31563761+OfficialNoob@users.noreply.github.com> Date: Sun, 4 Aug 2019 19:04:43 +0100 Subject: [PATCH] Removed getYouTubeVideoID as in utils --- content.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/content.js b/content.js index 73348973..77260012 100644 --- a/content.js +++ b/content.js @@ -1144,18 +1144,6 @@ function sendRequestToCustomServer(type, fullAddress, callback) { 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"); - if (url.includes("/embed/")) { - //it is an embed, don't search for v - id = match[7]; - } - - return (match && match[7].length == 11) ? id : false; -} - //returns the start time of the video if there was one specified (ex. ?t=5s) function getYouTubeVideoStartTime(url) { let searchParams = new URL(url).searchParams; @@ -1165,4 +1153,4 @@ function getYouTubeVideoStartTime(url) { } return startTime; -} \ No newline at end of file +}