.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
@@ -313,7 +313,7 @@ function getVideoId() {
return document.querySelector("meta[itemprop='videoId']").content;
} else {
if (pathname.startsWith("/shorts")) {
- return pathname.substr(8);
+ return pathname.slice(8);
}
return urlObject.searchParams.get("v");
@@ -79,7 +79,7 @@ function getVideoId(url) {