this post was submitted on 31 Jul 2023
0 points (NaN% liked)

Firefox

17942 readers
76 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 4 years ago
MODERATORS
 

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
[โ€“] eager_eagle@lemmy.world 1 points 1 year ago

first time I'm reading about userChrome.js tbh