Update utils.js

This commit is contained in:
Official Noob
2019-08-07 15:46:07 +01:00
committed by GitHub
parent c6c8d7de49
commit dce036b0e6

View File

@@ -2,9 +2,9 @@ function getYouTubeVideoID(url) {
try { // Attempt to parse url
let obj = new URL(url);
} catch (e) {
return false
} catch (e) {
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