Parcourir la source

WormChickenWizard found typo: clip not clips for video id retrieval

mphelp il y a 3 ans
Parent
commit
a303356d8c

+ 1 - 1
Extensions/UserScript/Return Youtube Dislike.user.js

@@ -327,7 +327,7 @@ function setInitialState() {
 function getVideoId() {
 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("/clips")) {
+  if (pathname.startsWith("/clip")) {
     return document.querySelector("meta[itemprop='videoId']").content;
     return document.querySelector("meta[itemprop='videoId']").content;
   } else {
   } else {
     return urlObject.searchParams.get("v");
     return urlObject.searchParams.get("v");

+ 1 - 1
Extensions/chrome/return-youtube-dislike.script.js

@@ -181,7 +181,7 @@ const NEUTRAL_STATE = "NEUTRAL_STATE";
   function getVideoId(url) {
   function getVideoId(url) {
     const urlObject = new URL(url);
     const urlObject = new URL(url);
     const pathname = urlObject.pathname;
     const pathname = urlObject.pathname;
-    if (pathname.startsWith("/clips")) {
+    if (pathname.startsWith("/clip")) {
       return document.querySelector("meta[itemprop='videoId']").content;
       return document.querySelector("meta[itemprop='videoId']").content;
     } else {
     } else {
       return urlObject.searchParams.get("v");
       return urlObject.searchParams.get("v");

+ 1 - 1
Extensions/firefox/return-youtube-dislike.script.js

@@ -186,7 +186,7 @@ function setInitialState() {
 function getVideoId(url) {
 function getVideoId(url) {
   const urlObject = new URL(url);
   const urlObject = new URL(url);
   const pathname = urlObject.pathname;
   const pathname = urlObject.pathname;
-  if (pathname.startsWith("/clips")) {
+  if (pathname.startsWith("/clip")) {
     return document.querySelector("meta[itemprop='videoId']").content;
     return document.querySelector("meta[itemprop='videoId']").content;
   } else {
   } else {
     return urlObject.searchParams.get("v");
     return urlObject.searchParams.get("v");