mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-02 10:52:20 +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 urlObject = new URL(window.location.href);
|
||||||
const pathname = urlObject.pathname;
|
const pathname = urlObject.pathname;
|
||||||
if (pathname.startsWith("/clip")) {
|
if (pathname.startsWith("/clip")) {
|
||||||
return document.querySelector("meta[itemprop='videoId']").content;
|
return (document.querySelector("meta[itemprop='videoId']") || document.querySelector("meta[itemprop='identifier']")).content;
|
||||||
} else {
|
} else {
|
||||||
if (pathname.startsWith("/shorts")) {
|
if (pathname.startsWith("/shorts")) {
|
||||||
return pathname.slice(8);
|
return pathname.slice(8);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ function getVideoId(url) {
|
|||||||
const urlObject = new URL(url);
|
const urlObject = new URL(url);
|
||||||
const pathname = urlObject.pathname;
|
const pathname = urlObject.pathname;
|
||||||
if (pathname.startsWith("/clip")) {
|
if (pathname.startsWith("/clip")) {
|
||||||
return document.querySelector("meta[itemprop='videoId']").content;
|
return (document.querySelector("meta[itemprop='videoId']") || document.querySelector("meta[itemprop='identifier']")).content;
|
||||||
} else {
|
} else {
|
||||||
if (pathname.startsWith("/shorts")) {
|
if (pathname.startsWith("/shorts")) {
|
||||||
return pathname.slice(8);
|
return pathname.slice(8);
|
||||||
|
|||||||
Reference in new issue
Block a user