cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CSS

LoolyTunes
Making moves

I think there should be a guide somewhere on how to create a userChrome.css file and then use it, it'll be really helpful to new users if they want to remove buttons or change icons when there's no feature to do that.

1 ACCEPTED SOLUTION

siffemcon
Contributor
4 REPLIES 4

Agentvirtuel
Collaborator

Hello

For information, for illustrative purposes, but it is not always easy to find the required information
https://connect.mozilla.org/t5/ideas/ability-to-edit-context-menus-remove-unnecessary-options/idc-p/...

siffemcon
Contributor

There won't be an official guide because Mozilla does not officially support adding custom style rules.

Agentvirtuel
Collaborator

Hello

About, allow moving the hamburger icon, for information purposes.

Take a look at https://www.camp-firefox.de/forum/thema/139663-hamburger-menü-nach-links/?postID=1276224#post1276224

//PanelUI-menu-button verschiebbar.uc.js

(function() {
  if (location != 'chrome://browser/content/browser.xhtml')
    return;  
  var menuButton = document.getElementById('PanelUI-menu-button');
 
  if (!CustomizableUI.getPlacementOfWidget('ucjs_PanelUI-button')) { 
    try {
      CustomizableUI.createWidget({
        id: 'ucjs_PanelUI-button',
        type: 'custom',
        defaultArea: CustomizableUI.AREA_NAVBAR,
        onBuild: function(aDocument) {
          var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbaritem');
          toolbaritem.id = 'ucjs_PanelUI-button';
          toolbaritem.className = 'chromeclass-toolbar-additional';          
          toolbaritem.setAttribute('label', 'Firefox Anpassen');          
          return toolbaritem;            
        }
      });
      if (!CustomizableUI.getPlacementOfWidget('ucjs_PanelUI-button')) {     
        menuButton.style.display = 'none';
        return; 
      };        
    } catch(e) {        
      menuButton.style.display = 'none';
      return;      
    };    
  };
  
  setTimeout(function() { 
   document.getElementById('ucjs_PanelUI-button').appendChild(menuButton);       
   menuButton.setAttribute('consumeanchor', 'ucjs_PanelUI-button');
   menuButton.setAttribute('label', 'Firefox Anpassen');
   menuButton.setAttribute('tooltiptext', 'Firefox Anpassen + Panel');        
  }, 0);

}());

Copy/paste the code into notepad
Save
Type: All files
PanelUI-menu-button verschiebbar.uc.js

Take a look at
https://mozhelp.ddnss.de/dateien/forum/ff-vorbereitung-skripte.mp4
https://github.com/Endor8/userChrome.js/tree/master/userChrome#hinweis download and unpack the ZIP file

By way of illustration https://www.youtube.com/embed/9EqZ7L-8p_g