From d79a8ac792f5008f7225fa45f96b208c16145d2d Mon Sep 17 00:00:00 2001 From: Xarth Date: Wed, 5 Jun 2024 06:59:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E5=B9=95?= =?UTF-8?q?=E4=BE=9D=E9=99=84=E5=85=83=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ede.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ede.js b/ede.js index 83f9a85..54a7005 100644 --- a/ede.js +++ b/ede.js @@ -1047,6 +1047,7 @@ await waitForMediaContainer(); let _container = null; + const reactRoot = document.getElementById('reactRoot'); document.querySelectorAll(mediaContainerQueryStr).forEach((element) => { if (!element.classList.contains('hide')) { _container = element; @@ -1066,13 +1067,17 @@ wrapper = document.createElement('div'); wrapper.id = 'danmakuWrapper'; - wrapper.style.position = 'absolute'; + wrapper.style.position = 'fixed'; wrapper.style.width = '100%'; wrapper.style.height = `calc(${window.ede.heightRatio * 100}% - 18px)`; wrapper.style.opacity = window.ede.opacity; wrapper.style.top = '18px'; - wrapper.style.overflow = 'hidden'; - _container.prepend(wrapper); + wrapper.style.pointerEvents = 'none'; + if (reactRoot) { + reactRoot.prepend(wrapper); + } else { + showDebugInfo('未找到video'); + } window.ede.danmaku = new Danmaku({ container: wrapper, From bdb240975b4d488c2871d0d72880ec56133e2879 Mon Sep 17 00:00:00 2001 From: Xarth Date: Wed, 5 Jun 2024 07:18:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B9=B6=E8=A1=8C=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=BC=B9=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ede.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ede.js b/ede.js index 54a7005..7db2b60 100644 --- a/ede.js +++ b/ede.js @@ -954,11 +954,11 @@ } } // 获取第三方弹幕 - for (const s of src) { - response = await makeGetRequest(url_ext + encodeURIComponent(s)); - data = isInTampermonkey ? JSON.parse(response) : await response.json(); + await Promise.all(src.map(async (s) => { + const response = await makeGetRequest(url_ext + encodeURIComponent(s)); + const data = isInTampermonkey ? JSON.parse(response) : await response.json(); comments = comments.concat(data.comments); - } + })); } showDebugInfo('弹幕下载成功: ' + comments.length); return comments; From e658fe5e96b09a93502e5b57823a194b69bb080c Mon Sep 17 00:00:00 2001 From: Xarth Date: Wed, 5 Jun 2024 07:25:30 +0800 Subject: [PATCH 3/3] Patch --- ede.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ede.js b/ede.js index 7db2b60..2920e7f 100644 --- a/ede.js +++ b/ede.js @@ -3,7 +3,7 @@ // @description Jellyfin弹幕插件 // @namespace https://github.com/RyoLee // @author RyoLee -// @version 1.40 +// @version 1.41 // @copyright 2022, RyoLee (https://github.com/RyoLee) // @license MIT; https://raw.githubusercontent.com/Izumiko/jellyfin-danmaku/jellyfin/LICENSE // @icon https://github.githubassets.com/pinned-octocat.svg