8

I have enabled everything to make userChrome.css work, but it doesn't seem like any JS works when I paste it into a userChrome.js file in my chrome folder, including this JS snippet, it could be because I'm on macOS. I should note that the chrome folder is not in my profile directory, its somewhere else and symlinked to that profile and 4 others.

(function(){
  _ucUtils.registerHotkey(
  {
    id: "testKey",
    key: "g",
    modifiers: "Ctrl br Alt",
    
  },
  function(win,hotkey){
    const doc = win.document;
    const bmtb = CustomizableUI.AREA_BOOKMARKS;
    CustomizableUI.setToolbarVisibility(
      bmtb,
      doc.getElementById(bmtb).getAttribute("collapsed")==="true");
  });
})();

you are viewing a single comment's thread
view the rest of the comments
[-] WestwardWinds@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

I am on MacOS. I can't help you in regards to the linked profile directory, if you think it needs to be set that way I believe you. But, I did set up userChrome.css the other day and I couldn't get it to work until I went to about:config and toggled the following to True:

toolkit.legacyUserProfileCustomizations.stylesheets
layers.acceleration.force-enabled
gfx.webrender.all
gfx.webrender.enabled
layout.css.backdrop-filter.enabled
svg.context-properties.content.enabled

Now this is specifically what I did for a userChrome.css not .js but most guides I found only said to toggle toolkit.legacyUserProfileCustomizations.stylesheets but it only worked with those additional flags set to True as well. Maybe this will help you out some.

this post was submitted on 31 Jul 2023
8 points (100.0% liked)

Firefox CSS

431 readers
1 users here now

Pushing the limits of the Firefox Browser through the use of CSS.

#join #firefoxcss:mozilla.org

Post your Firefox UI customizations here!

What is userChrome.css?

Rules (enforced)

  1. Posts must have flair!

  2. Follow Lemmy.World rules

  3. Posts cannot be memes/shitposts. They should be about Firefox customization with CSS.

  4. Please be civil. Bear in mind that many users come here for help and would be turned off by insults and rudeness.

  5. When posting large amount of code use a service dedicated to hosting text snippets, such as pastebin, hastebin, github gist or equivalent. Relatively short snippets can be wrapped in code-block for inline viewing.

  6. Do NOT use url-shorteners or link to compressed downloads (such as zip or rar) when sharing code.

Guidelines (not enforced)

Consider adding the following info to help people try your tweaks:

  1. Screenshots should have code in comments.

  2. Include Firefox version

  3. When asking for help you should share your custom style to help others understand what you are doing. This is increasingly important the more custom rules you have.

  4. List any other addons that may be changing the UI

  5. If a custom wallpaper is used, include a link to the original.

  6. If someone's comment solves you problem, reply to the comment to let them know, and change your post flair to solved.

Wiki

Find Helpful Knowledge and answers to common issues in /c/FirefoxCSS wiki.

Links

Lemmy Communities

Websites

founded 1 year ago
MODERATORS