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

[Feature request] Hotkey to toggle style(s) that match the rule for specific site or one-click extra button #35

Closed
Kein opened this issue Feb 26, 2017 · 14 comments

Comments

@Kein
Copy link

Kein commented Feb 26, 2017

Long story short I use Stylish as a toggle feature for a lot of junk UI items on Discord (just as an example), problem is - it is really annoying to click the button then click style checkbox when I want to bring up some of these elements.

What would be great: a hotkey or an ability to show extra bar button that just does this: enabled or disables (toggle) any matching rules for the site (or may be, if we look deeper, we can specify extra option for each style "Enforce on quick-toggle?")

@Kein Kein changed the title [Feature request] Hotkey to toggle style(s) that match the rule for specific site or one-click secodn button [Feature request] Hotkey to toggle style(s) that match the rule for specific site or one-click extra button Feb 26, 2017
@tophf
Copy link
Member

tophf commented Mar 14, 2017

I guess we can add:

  • a hotkey in the style editor so that it toggles the currently opened style. And a tooltip over [x] enabled checkbox.
  • a browser global hotkey to toggle all styles for the active tab

Thoughts?

@narcolepticinsomniac
Copy link
Member

Not sure what what you mean by "currently opened style", but more toggles and hotkeys are almost always a good thing. "Toggle active tab" is a no-brainer, and would be very useful. I'd also think "toggle all styles for current domain" would be useful and different, since presumably it wouldn't include global styles like active tab.

In general, it'd be cool to be able to assign hotkeys to specific styles, to toggle them individually.

@tophf
Copy link
Member

tophf commented Mar 14, 2017

currently opened style it's about the style editor. Basically this hotkey would toggle the [x] Enable checkbox. Am I that bad at describing things? :-(

@narcolepticinsomniac
Copy link
Member

Since the only alternative is that I'm bad at understanding things...yes?? "Currently open in the editor". Yes, that makes a lot of sense and would be very useful. [x] enabled checkbox should've tipped me off, honestly.

@narcolepticinsomniac
Copy link
Member

I don't know how straightforward what you have in mind would be, but if we ever did decide to add a ton of customizable hotkey options, maybe this project would be of interest.

@tophf
Copy link
Member

tophf commented Apr 17, 2017

I'm not sure we should use DOM key events. Currently our hotkeys are using chrome.commands API so it would make sense to add like 10 empty "slots" in that browser shortcut customization dialog, and a sub-page in OptionsUI to customize these "slots".

@narcolepticinsomniac
Copy link
Member

Figured it might be worth mentioning. Personally, I'm not sure I would ever utilize a whole lot of hotkeys, but it's a fairly common request. I imagine hotkeys for toggling individual styles could add up pretty quickly for some users, if that's even going to be an option. I always kinda figured the chrome API would have restrictions on how many could be used, but I certainly don't know that for a fact.

@tophf
Copy link
Member

tophf commented Apr 17, 2017

Huh, chrome.commands API has a maximum of 4 hotkeys per extension. I still like the API more than DOM methods because it allows us to have a small content script, but anyway we'll see when we get to implementation stage.

@tophf
Copy link
Member

tophf commented Nov 29, 2017

#263 provides an alternative: you can set an activation hotkey in the extension options so it'll open the popup. Then you can toggle the styles by pressing the number keys. For example, Alt-Q and 1 will toggle the first displayed style. To make a style be the first one you can rename it locally in the editor to !something or 1:something and so on.

@eight04
Copy link
Collaborator

eight04 commented Oct 3, 2018

I think this can be closed?

@Mottie
Copy link
Member

Mottie commented Oct 3, 2018

I think the plan for this issue was:

  • To create a shortcut key to toggle all styles in the current tab.
  • Create a shortcut key to toggle the style from within the editor - toggle the [x] enabled checkbox & save.

The shortcuts to open the popup & toggle individual styles is available, but separate from this enhancement request.

@eight04
Copy link
Collaborator

eight04 commented Oct 3, 2018

  • Create a shortcut key to toggle the style from within the editor - toggle the [x] enabled checkbox & save.

In the editor, you can press Alt + Enter to toggle the style. The UI is buggy though, it makes the editor state become dirty.

@Mottie
Copy link
Member

Mottie commented Oct 3, 2018

you can press Alt + Enter to toggle the style

Ahh, I forgot about that!

@tophf
Copy link
Member

tophf commented Apr 4, 2023

#1579 mentions the same idea in more detail, i.e. I misinterpreted this issue initially, hence closing it.

@tophf tophf closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants