From 758bdbed9c2453e1032f8bc3fe55448c0a59f1af Mon Sep 17 00:00:00 2001 From: hanyd Date: Thu, 5 Dec 2024 19:51:24 +0800 Subject: [PATCH] update skip button style --- public/content.css | 13 +++++++------ src/js-components/skipButtonControlBar.ts | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/public/content.css b/public/content.css index 4559717c..fe7f83a0 100644 --- a/public/content.css +++ b/public/content.css @@ -107,24 +107,25 @@ .autoHiding:not(.sbhidden) { transform: translateX(0%); - transition: transform 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), width 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.2s cubic-bezier(0.19, 1, 0.22, 1) !important; + transition: transform 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), width 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), + opacity 0.2s cubic-bezier(0.19, 1, 0.22, 1) !important; } .autoHiding.sbhidden { transform: translateX(100%); - transition: transform 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), width 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.2s cubic-bezier(0.19, 1, 0.22, 1) !important; - /* width: 0px !important; */ + transition: transform 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), width 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), + opacity 0.2s cubic-bezier(0.19, 1, 0.22, 1) !important; opacity: 0; } -@media (max-width: 1260px){ - .autoHiding.sbhidden{ +@media (max-width: 1260px) { + .autoHiding.sbhidden { width: 0px !important; } } .autoHiding.sbhidden.autoHideLeft { - transform: translateX(-100%) scale(0); + transform: translateX(-100%); } .sponsorSkipObject { diff --git a/src/js-components/skipButtonControlBar.ts b/src/js-components/skipButtonControlBar.ts index 501816b7..66b85165 100644 --- a/src/js-components/skipButtonControlBar.ts +++ b/src/js-components/skipButtonControlBar.ts @@ -38,11 +38,13 @@ export class SkipButtonControlBar { this.skipButton = document.createElement("button"); this.skipButton.classList.add("bpx-player-ctrl-btn", "playerButton"); this.skipButton.id = "sbSkipIconControlBarButton"; + this.skipButton.draggable = false; this.skipIcon = document.createElement("img"); this.skipIcon.src = chrome.runtime.getURL("icons/skipIcon.svg"); this.skipIcon.classList.add("bpx-player-ctrl-btn-icon", "playerButtonImage"); this.skipIcon.id = "sbSkipIconControlBarImage"; + this.skipIcon.draggable = false; this.skipButton.appendChild(this.skipIcon);