mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Update utils.js
This commit is contained in:
2
utils.js
2
utils.js
@@ -3,8 +3,8 @@ function getYouTubeVideoID(url) {
|
||||
try { // Attempt to parse url
|
||||
let obj = new URL(url);
|
||||
} catch (e) {
|
||||
return false
|
||||
console.error("[SB] Unable to parser URL");
|
||||
return false
|
||||
}
|
||||
|
||||
if(!["www.youtube.com","www.youtube-nocookie.com"].includes(obj.host)) return false // Check if valid hostname
|
||||
|
||||
Reference in New Issue
Block a user