michioxd / sounddark

An extension/add-on to get better Dark theme for SoundCloud in your favorite browser
https://chromewebstore.google.com/detail/sounddark/ablcfojnfkneoplpflnpbeglgkjmiman
MIT License
6 stars 2 forks source link

feat: show current mode on hover #5

Closed NiceAesth closed 9 months ago

NiceAesth commented 9 months ago

Helps alleviate some confusion for the system icon.

michioxd commented 9 months ago

Try adding a title to the all mode icon, but I think it might be added to the a element instead of the icon because if you hover outside of the icon (not in the icon), it will not show the title, i guess. If you do that, you must use some JavaScript to do it

NiceAesth commented 9 months ago

Ah, I see. Will look into it now.

NiceAesth commented 9 months ago

While working on this, I did find that the way SoundDark_mode works is odd as it's always the opposite of whatever is displayed. Did not change that behaviour in this PR.

michioxd commented 9 months ago

While working on this, I did find that the way SoundDark_mode works is odd as it's always the opposite of whatever is displayed. Did not change that behaviour in this PR.

I think you can put those check SoundDark_mode value inside GetTitle function. In the append SoundDark menu to the context menu you can do like this:

`...
title="${GetTitle()}"
...`

This will get new state during rendering. Then put your title change function with GetTitle value to the end of inside toggle mode function.