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

Ability to change titlepreface for to enhance userChrome.css theme capability #703

Closed
Shina-SG opened this issue Jan 26, 2024 · 3 comments
Closed

Comments

@Shina-SG
Copy link

Describe your matter in detail

Currently I'm using this extension https://github.com/Joolee/userchrome-toggle with hotkey for switching titlepreface back and forth to trigger my theme in userChrome.css. I don't think this extension accept message send from Gesturefy, but can user script from Gesturefy toggle simillar function from userchrome toggle since I don't know much about user script much. Thanks in advance.

Screenshots or further assistance

Your System

  • Operating system: Windows 11 23H2
  • Firefox version: 122.0
  • Gesturefy version: 3.2.11
@Robbendebiene
Copy link
Owner

Hi, I took a quick look at the extension. You should be able to use something like this as a user script:

API.windows.getCurrent().then((windowId) => {
  API.windows.update(windowId.id, {
    titlePreface: REPLACE_WITH_TITLE_PREFIX
  });
});

(not tested)

Using one of the prefixes defined here:
https://github.com/Joolee/userchrome-toggle/blob/62eb529ac0e625fe8dd33cf28be07a378dd33303/uct-background.js#L3-L28

Otherwise ask the author of the extension to accept messages from other add-ons 🙂

@Shina-SG
Copy link
Author

Thanks much, but does seems like user script doesn't work for some reason.

I was testing with a simple changing the titlepreface to XXX to hide the titlebar from this Sidebery's userChrome.css https://github.com/mbnuqw/sidebery/wiki/Firefox-Styles-Snippets-(via-userChrome.css)#dynamic-native-tabs

I guess it would be better that I implement API for the extension to accept message from Gesturefy.

@Robbendebiene
Copy link
Owner

According to my testing at least the prefix is successfully added to the window, but I cannot say anything about the userChrome stuff.

I guess it would be better that I implement API for the extension to accept message from Gesturefy.

At least this would solve a limitation user scripts are still suffering from which is that they are blocked on certain pages like GitHub.

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

2 participants