Replace deprecated String.prototype.substr()

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
Tobias Speicher committed 2022-03-25 15:41:48 +01:00
1 parent f5650fcc4e
commit 73448d2bd1
2 files changed
+2 -2

No files matched your search

@@ -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");
}