My own customized userChrome
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

userChrome.xml 856B

123456789101112131415161718192021
  1. <?xml version="1.0"?>
  2. <bindings id="generalBindings"
  3. xmlns="http://www.mozilla.org/xbl"
  4. xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  5. xmlns:xbl="http://www.mozilla.org/xbl">
  6. <binding id="js" extends="chrome://global/content/bindings/toolbarbutton.xml#menu">
  7. <implementation>
  8. <constructor><![CDATA[
  9. function makeRelativePathURI(name) {
  10. let absolutePath = Components.stack.filename;
  11. return absolutePath.substring(0, absolutePath.lastIndexOf("/") + 1) + name;
  12. }
  13. // The following code executes in the browser context,
  14. // i.e. chrome://browser/content/browser.xul
  15. Services.scriptloader.loadSubScript(makeRelativePathURI("userChrome.js"), window);
  16. ]]></constructor>
  17. </implementation>
  18. </binding>
  19. </bindings>