feat: Add chapter text display on progress hover in artplayer-plugin-chapter

This commit is contained in:
Harvey Zack committed 2024-06-02 18:51:16 +08:00
1 parent 33eba49a3b
commit 0804d1790b
5 files changed
+63 -5

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ export default function progress(options) {
function showHighlight(event) {
const { width } = getPosFromEvent(art, event);
const { text } = event.target.dataset;
$tip.innerHTML = text;
$tip.innerText = text;
const tipWidth = $tip.clientWidth;
if (width <= tipWidth / 2) {
setStyle($tip, 'left', 0);