From dfb8513d1ecec6a135a494872944c2d0dc9bc4d1 Mon Sep 17 00:00:00 2001 From: Izumiko Date: Tue, 23 Jan 2024 14:58:25 +0000 Subject: [PATCH] deploy: d32d1f6c15ce6d1875720e296c4815289dbe1b8d --- ede.user.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ede.user.js b/ede.user.js index b7dca81..f946544 100644 --- a/ede.user.js +++ b/ede.user.js @@ -3,7 +3,7 @@ // @description Jellyfin弹幕插件 // @namespace https://github.com/RyoLee // @author RyoLee -// @version 1.20 +// @version 1.21 // @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 @@ -625,7 +625,8 @@ wrapper.id = 'danmakuWrapper'; wrapper.style.position = 'absolute'; wrapper.style.width = '100%'; - wrapper.style.height = window.ede.heightRatio * 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); @@ -635,12 +636,9 @@ media: _media, comments: _comments, engine: 'canvas', + speed: window.ede.speed, }); - wrapper.lastChild.style.opacity = window.ede.opacity; - window.ede.danmaku.speed = window.ede.speed - wrapper.style.height = `${window.ede.heightRatio * 100}%`; - window.ede.danmakuSwitch == 1 ? window.ede.danmaku.show() : window.ede.danmaku.hide(); if (window.ede.obResize) { window.ede.obResize.disconnect();