Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 827ddef

Browse files
committed
add hover effect to code language selector
1 parent c8f3eaf commit 827ddef

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/content-script/update-solutions-tab.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,14 @@ function createLanguageButtons(problem: any) {
316316
langButton.style.backgroundColor = isDark ? '#373737' : '#f3f4f5';
317317
langButton.style.color = isDark ? '#fff' : '#1a1a1a';
318318
langButton.style.border = `1px solid ${isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'}`;
319+
320+
// on hover just make the background a few shades darker or lighter
321+
langButton.addEventListener('mouseenter', () => {
322+
langButton.style.backgroundColor = isDark ? '#424242' : '#e6e6e6';
323+
});
324+
langButton.addEventListener('mouseleave', () => {
325+
langButton.style.backgroundColor = isDark ? '#373737' : '#f3f4f5';
326+
});
319327
});
320328

321329
const langIcon = document.createElement('img');

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /