From 6fbc4046c0abffd1707954124883f02320e56b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=96=B5=E5=96=B5=E4=B8=8D=E4=BC=9A=E5=96=B5?= =?UTF-8?q?=E5=96=B5=E5=8F=AB?= <75050154+Xsy41@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:54:34 +0800 Subject: [PATCH] Star button hover inactive after click (#877) --- .../features/repo-star-tooltip/index.tsx | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/pages/ContentScripts/features/repo-star-tooltip/index.tsx b/src/pages/ContentScripts/features/repo-star-tooltip/index.tsx index 44ae1dfc..3881257b 100644 --- a/src/pages/ContentScripts/features/repo-star-tooltip/index.tsx +++ b/src/pages/ContentScripts/features/repo-star-tooltip/index.tsx @@ -30,19 +30,16 @@ const init = async (): Promise => { //
// No matter the repo is starred or not, the two button are always there // Select all star buttons and no more filtering - const $starButton = $(starButtonSelector).filter(function () { - if ($(this).parent().parent().css('display') !== 'none') { - return true; - } else { - return false; - } + + const $starButtons = $(starButtonSelector); + $starButtons.each(function () { + const placeholderElement = $('
').appendTo('body')[0]; + createRoot(placeholderElement).render( + + + + ); }); - const placeholderElement = $('
').appendTo('body')[0]; - createRoot(placeholderElement).render( - - - - ); }; const restore = async () => {};