mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-21 13:53:01 +01:00
fix: getVideoId() with clip (#1055)
This commit is contained in:
1 parent
eda0aca9e9
commit
bf98563c17
2 files changed
+2
-2
No files matched your search
@@ -504,7 +504,7 @@ function getVideoId() {
|
||||
const urlObject = new URL(window.location.href);
|
||||
const pathname = urlObject.pathname;
|
||||
if (pathname.startsWith("/clip")) {
|
||||
return document.querySelector("meta[itemprop='videoId']").content;
|
||||
return (document.querySelector("meta[itemprop='videoId']") || document.querySelector("meta[itemprop='identifier']")).content;
|
||||
} else {
|
||||
if (pathname.startsWith("/shorts")) {
|
||||
return pathname.slice(8);
|
||||
|
||||
@@ -66,7 +66,7 @@ function getVideoId(url) {
|
||||
const urlObject = new URL(url);
|
||||
const pathname = urlObject.pathname;
|
||||
if (pathname.startsWith("/clip")) {
|
||||
return document.querySelector("meta[itemprop='videoId']").content;
|
||||
return (document.querySelector("meta[itemprop='videoId']") || document.querySelector("meta[itemprop='identifier']")).content;
|
||||
} else {
|
||||
if (pathname.startsWith("/shorts")) {
|
||||
return pathname.slice(8);
|
||||
|
||||
Reference in new issue
Block a user