Skip to content

Commit

Permalink
fix undefined part in 9animetv id
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyhalight committed Aug 18, 2024
1 parent 7246b84 commit c622fe6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/vot-min.user.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/vot.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3090,7 +3090,7 @@ class NineAnimeTVHelper extends BaseHelper {
}

if (e.data?.startsWith("getVideoId:")) {
resolve(e.data.replace("getVideoId:"))
resolve(e.data.replace("getVideoId:", ""))
}
})
window.top.postMessage("getVideoId", origin);
Expand Down Expand Up @@ -6163,8 +6163,8 @@ class VideoHandler {
await this.updateTranslationErrorMsg(
res.remainingTime > 0
? secsToStrTime(res.remainingTime)
: (res.message ??
localizationProvider.get("translationTakeFewMinutes")),
: res.message ??
localizationProvider.get("translationTakeFewMinutes"),
);
} catch (err) {
console.error("[VOT] Failed to translate video", err);
Expand Down
4 changes: 2 additions & 2 deletions patches/vot.js+1.1.0+004+fix-basic-helpers.patch
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ index e2af81a..57431c4 100644
if (!secureScript.length) {
throw new VideoHelperError("Failed to find secure script");
diff --git a/node_modules/vot.js/dist/helpers/nineanimetv.js b/node_modules/vot.js/dist/helpers/nineanimetv.js
index 0cf3606..75639d5 100644
index 0cf3606..6343ea5 100644
--- a/node_modules/vot.js/dist/helpers/nineanimetv.js
+++ b/node_modules/vot.js/dist/helpers/nineanimetv.js
@@ -72,6 +72,18 @@ export default class NineAnimeTVHelper extends BaseHelper {
Expand All @@ -144,7 +144,7 @@ index 0cf3606..75639d5 100644
+ }
+
+ if (e.data?.startsWith("getVideoId:")) {
+ resolve(e.data.replace("getVideoId:"))
+ resolve(e.data.replace("getVideoId:", ""))
+ }
+ })
+ window.top.postMessage("getVideoId", origin);
Expand Down

0 comments on commit c622fe6

Please sign in to comment.