Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide the badge (and darken the icon?) if there is no video #33

Open
Hypfer opened this issue Jan 13, 2022 · 5 comments
Open

Hide the badge (and darken the icon?) if there is no video #33

Hypfer opened this issue Jan 13, 2022 · 5 comments

Comments

@Hypfer
Copy link

Hypfer commented Jan 13, 2022

I've just installed and tested this extension. It works great!
The only thing I don't like about it is that green badge which is very green.

image

Maybe changing the color scheme to match the one seen on the uBlock Origin icon?
Or maybe also hide the badge entirely if there is no video element on the page?

Maybe even both things?

switch (settingName) {
// TODO DRY colors? Though here they're darker anyway, to account for the white text.
// TODO Also DRY `toFixed` precision, to match the popup?
case 'soundedSpeed': return [value.toFixed(2), '#0d0'];
case 'silenceSpeedRaw': return [value.toFixed(2), '#d00'];
// I guess it's better when it's blue and not red, so it's not confused with `silenceSpeed`.
case 'volumeThreshold': return [value.toFixed(4), '#00d'];
// TODO any better ideas for background colors for these two?
case 'marginBefore': return [value.toFixed(3), '#333'];
case 'marginAfter': return [value.toFixed(3), '#333'];
// default: assertNever(settingName); Does not work because of the generic type. TODO
default: throw new Error();

I see that there's a TODO there. What does DRY mean in that context?

@Hypfer
Copy link
Author

Hypfer commented Jan 13, 2022

After scrolling a bit further down in that initIconAndBadgeUpdater.ts, I've found settings.badgeWhatSettingToDisplayByDefault

image

Issue solved. The green is still very green though

It might make sense to reorder the settings page so that the simple options such as the badge one come before that huge blob of keyboard hotkeys, as - at least in my experience a few minutes ago - those pretty much made me tune out entirely

@Hypfer Hypfer closed this as completed Jan 13, 2022
@WofWca
Copy link
Owner

WofWca commented Jan 13, 2022

Feels good to solve issues before they even start existing 😎

DRY means "don't repeat yourself", thought maybe these colors should be the same as the chart colors.

The green is still very green though

In what sense? Poor contrast? Too bright and distracting?

so that the simple options such as the badge one come before that huge blob of keyboard hotkeys

Yeah, the options page looks like it could used some work. However I thought that the hotkeys are more important that the badge, therefore they should go first.

@Hypfer
Copy link
Author

Hypfer commented Jan 14, 2022

Too bright and distracting?

Yeah, that one.
For me It's constantly drawing attention even though nothing is happening that would require any.

@WofWca
Copy link
Owner

WofWca commented Aug 24, 2022

Actually I think that option is not enough, because you may want the badge to always display something, but only when there's a video.

@WofWca WofWca reopened this Aug 24, 2022
@WofWca WofWca changed the title Suggestion: Change badge color scheme or hide if if there is no video Hide the badge (and darken the icon?) if there is no video Aug 24, 2022
@WofWca
Copy link
Owner

WofWca commented Jul 11, 2024

Manifest V3 adds per-tab badge and icon support. This should be easy to implement now.

So I suppose we could set the default icon to the darkened one and then if on this page we find the video then set the icon and the badge.
Because a single tab can have several videos, plus several iframes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants