From 8127489173f8a33db07f18115b7ab13fde6de3c9 Mon Sep 17 00:00:00 2001 From: kawamataryo Date: Sun, 21 May 2023 22:49:03 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20fix=20follow=20btn=20transition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/domHelpers.ts | 4 ++++ src/style.content.css | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/lib/domHelpers.ts b/src/lib/domHelpers.ts index 4cf8797..d308303 100644 --- a/src/lib/domHelpers.ts +++ b/src/lib/domHelpers.ts @@ -96,6 +96,7 @@ export const insertBskyProfileEl = ({ dom, profile, abortController, followActio target.textContent = "Follow on Bluesky" target.classList.remove('follow-button__processing') target.classList.remove('follow-button__following') + target.classList.add('follow-button__just-followed') return } }, { @@ -115,6 +116,9 @@ export const insertBskyProfileEl = ({ dom, profile, abortController, followActio bskyUserContentDom?.addEventListener('mouseout', async (e) => { const target = e.target as Element const classList = target.classList + if(classList.contains('follow-button__just-followed')) { + target.classList.remove('follow-button__just-followed') + } if (classList.contains('follow-button') && classList.contains('follow-button__following')) { target.textContent = "Following on Bluesky" } diff --git a/src/style.content.css b/src/style.content.css index 4d181fc..fb3bddd 100644 --- a/src/style.content.css +++ b/src/style.content.css @@ -1,7 +1,6 @@ /* ----------------- */ /* base */ /* ----------------- */ - :root { --bsky-primary-color: rgb(29, 78, 216); --bsky-primary-hover-color: #2563eb; @@ -88,10 +87,17 @@ cursor: pointer; } +.name-and-controller .follow-button__following.follow-button__just-followed:hover { + background: transparent !important; + color: #fff !important; + border: 1px solid #fff !important; + cursor: pointer; +} + .name-and-controller .follow-button__processing { - background: rgb(255,255,255, 0.3);; - color: #fff; - border: 1px solid #fff; + background: rgb(255,255,255, 0.3) !important; + color: #fff !important; + border: 1px solid #fff !important; cursor: auto; }