Advertisement
EstherMoellman

Untitled

Jun 15th, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <?xml version="1.0"?>
  2.  
  3. <bindings id="generalBindings"
  4. xmlns="http://www.mozilla.org/xbl"
  5. xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  6. xmlns:xbl="http://www.mozilla.org/xbl">
  7.  
  8. <binding id="js" extends="chrome://global/content/bindings/toolbarbutton.xml#menu">
  9. <implementation>
  10. <constructor><![CDATA[
  11. function makeRelativePathURI(name) {
  12. let absolutePath = Components.stack.filename;
  13. return absolutePath.substring(0, absolutePath.lastIndexOf("/") + 1) + name;
  14. }
  15.  
  16. // The following code executes in the browser context,
  17. // i.e. chrome://browser/content/browser.xul
  18. Services.scriptloader.loadSubScript(makeRelativePathURI("ScrollBar.js"), window);
  19. ]]></constructor>
  20. </implementation>
  21. </binding>
  22. </bindings>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement