aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay <[email protected]>2023-04-27 15:18:17 -0400
committerAjay <[email protected]>2023-04-27 15:18:17 -0400
commit7768447ab0c0e1a4c04a42d76dc155930de94ed2 (patch)
treea5b9d3f515dfaa481f5ef3cecb791a67951a0d6f
parente31efbbf8195f48e29a97f06031f367e4082d131 (diff)
downloadSponsorBlock-7768447ab0c0e1a4c04a42d76dc155930de94ed2.tar.gz
SponsorBlock-7768447ab0c0e1a4c04a42d76dc155930de94ed2.zip
Upgrade maze-utils, move video element refreshes to lib
-rw-r--r--package-lock.json14
-rw-r--r--package.json2
-rw-r--r--src/content.ts5
3 files changed, 9 insertions, 12 deletions
diff --git a/package-lock.json b/package-lock.json
index 66da680e..d9fb9451 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -27,7 +27,7 @@
],
"license": "LGPL-3.0-or-later",
"dependencies": {
- "@ajayyy/maze-utils": "1.1.11",
+ "@ajayyy/maze-utils": "1.1.22",
"content-scripts-register-polyfill": "^4.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
@@ -67,9 +67,9 @@
}
},
"node_modules/@ajayyy/maze-utils": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@ajayyy/maze-utils/-/maze-utils-1.1.11.tgz",
- "integrity": "sha512-hHXqKpPG92c8efvYYmYfjKHhoEaURLJEaK2URIaSAqmxYaFX46hdgyQ/DWMDRx1ffbi49uZ84fOwjFLsyhG5cw==",
+ "version": "1.1.22",
+ "resolved": "https://registry.npmjs.org/@ajayyy/maze-utils/-/maze-utils-1.1.22.tgz",
+ "integrity": "sha512-1BLVVqPHkf+mUlutFiKulQAa1Rt/IJ88ahwIYUAYkBrAVG0T5i75jEzHatsxdILYsg4bxDEpnUcOlrhvhSIdRQ==",
"funding": [
{
"type": "individual",
@@ -13858,9 +13858,9 @@
},
"dependencies": {
"@ajayyy/maze-utils": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@ajayyy/maze-utils/-/maze-utils-1.1.11.tgz",
- "integrity": "sha512-hHXqKpPG92c8efvYYmYfjKHhoEaURLJEaK2URIaSAqmxYaFX46hdgyQ/DWMDRx1ffbi49uZ84fOwjFLsyhG5cw=="
+ "version": "1.1.22",
+ "resolved": "https://registry.npmjs.org/@ajayyy/maze-utils/-/maze-utils-1.1.22.tgz",
+ "integrity": "sha512-1BLVVqPHkf+mUlutFiKulQAa1Rt/IJ88ahwIYUAYkBrAVG0T5i75jEzHatsxdILYsg4bxDEpnUcOlrhvhSIdRQ=="
},
"@ampproject/remapping": {
"version": "2.2.0",
diff --git a/package.json b/package.json
index c678efa8..51d559f1 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"description": "",
"main": "background.js",
"dependencies": {
- "@ajayyy/maze-utils": "1.1.11",
+ "@ajayyy/maze-utils": "1.1.22",
"content-scripts-register-polyfill": "^4.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
diff --git a/src/content.ts b/src/content.ts
index b3ba9b33..2fc328ec 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -36,7 +36,7 @@ import { ChapterVote } from "./render/ChapterVote";
import { openWarningDialog } from "./utils/warnings";
import { waitFor } from "@ajayyy/maze-utils";
import { getFormattedTime } from "@ajayyy/maze-utils/lib/formating";
-import { setupVideoMutationListener, getChannelIDInfo, getVideo, refreshVideoAttachments, getIsAdPlaying, getIsLivePremiere, setIsAdPlaying, checkVideoIDChange, getVideoID, getYouTubeVideoID, setupVideoModule, checkIfNewVideoID, isOnInvidious, isOnMobileYouTube } from "@ajayyy/maze-utils/lib/video";
+import { getChannelIDInfo, getVideo, getIsAdPlaying, getIsLivePremiere, setIsAdPlaying, checkVideoIDChange, getVideoID, getYouTubeVideoID, setupVideoModule, checkIfNewVideoID, isOnInvidious, isOnMobileYouTube } from "@ajayyy/maze-utils/lib/video";
import { StorageChangesObject } from "@ajayyy/maze-utils/lib/config";
import { findValidElement } from "@ajayyy/maze-utils/lib/dom"
import { getHash, HashedValue } from "@ajayyy/maze-utils/lib/hash";
@@ -993,7 +993,6 @@ function setupCategoryPill() {
async function sponsorsLookup(keepOldSubmissions = true) {
if (lookupWaiting) return;
- if (!getVideo() || !isVisible(getVideo())) refreshVideoAttachments();
//there is still no video here
if (!getVideo()) {
lookupWaiting = true;
@@ -1004,8 +1003,6 @@ async function sponsorsLookup(keepOldSubmissions = true) {
return;
}
- setupVideoMutationListener();
-
const categories: string[] = Config.config.categorySelections.map((category) => category.name);
const extraRequestData: Record<string, unknown> = {};