mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 04:57:09 +03:00
Update utils.js
This commit is contained in:
1
utils.js
1
utils.js
@@ -35,6 +35,7 @@ function getYouTubeVideoID(url) {
|
|||||||
if(!["www.youtube.com","www.youtube-nocookie.com"].includes(urlObject.host)) return false;
|
if(!["www.youtube.com","www.youtube-nocookie.com"].includes(urlObject.host)) return false;
|
||||||
|
|
||||||
//Get ID from searchParam
|
//Get ID from searchParam
|
||||||
|
if(!urlObject.searchParams.has("v")) return false
|
||||||
if (["/watch", "/watch/"].includes(urlObject.pathname) || urlObject.pathname.startsWith("/tv/watch")) {
|
if (["/watch", "/watch/"].includes(urlObject.pathname) || urlObject.pathname.startsWith("/tv/watch")) {
|
||||||
id = urlObject.searchParams.get("v");
|
id = urlObject.searchParams.get("v");
|
||||||
return id.length == 11 ? id : false;
|
return id.length == 11 ? id : false;
|
||||||
|
|||||||
Reference in New Issue
Block a user