diff --git a/LICENSE b/LICENSE index 94a9ed02..ce167a86 100644 --- a/LICENSE +++ b/LICENSE @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) + SponsorBlock Copyright (C) 2019 Ajay Ramachandran and other SponsorBlock contributors This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/README.md b/README.md index 274fe20a..74fbcac5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ SponsorBlock is an extension that will skip over sponsored segments of YouTube v # Available for Chrome and Firefox -Chrome: https://chrome.google.com/webstore/detail/mnjggcdmjocbbbhaepdhchncahnbgone/ +Chrome: https://chrome.google.com/webstore/detail/ajjollijmimolcncegpgkbilohbhjnhi Firefox: https://addons.mozilla.org/addon/sponsorblock/ @@ -34,3 +34,5 @@ You can load this project as an unpacked extension. Make sure to rename the `con The awesome [Invidious API](https://github.com/omarroth/invidious/wiki/API) is used to grab the time the video was published. Some icons made by Gregor Cresnar from www.flaticon.com and are licensed by CC 3.0 BY + +Some icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY diff --git a/popup.js b/popup.js index e26bafce..95482305 100644 --- a/popup.js +++ b/popup.js @@ -943,10 +943,11 @@ function runThePopup() { xmlhttp.send(); } - function getYouTubeVideoID(url) { // Return video id or false - let regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; - let match = url.match(regExp); - return (match && match[7].length == 11) ? match[7] : false; + 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 @@ -958,4 +959,5 @@ if (chrome.tabs != undefined) { //this means it is actually opened in the popup runThePopup(); -} \ No newline at end of file +} +