mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-22 14:23:01 +01:00
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:
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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user