MozillaZine

[Ext] userChrome.js

Announce and Discuss the Latest Theme and Extension Releases.
Zoolcar9

User avatar
 
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)

Post Posted May 26th, 2006, 2:35 am

Greg S wrote:Speaking of find close button on the right, I'm wanting to add this to the view source window as well. Is this possible? I've tried with no joy so far.

You need WindowHook script for that

Code: Select all
(function() {

/*----- WindowHook snippet here -----*/

  WindowHook.register("chrome://global/content/viewSource.xul",
    function(aWindow) {
      // move find bar to the top
      var findbar = aWindow.document.getElementById('FindToolbar');
      var menubar = aWindow.document.getElementById('viewSource-main-menubar');
      menubar.parentNode.appendChild(findbar);

      ......

    }
  );
})();

Just don't forget:

use <code>aWindow</code> instead of <code>window</code> and <code>aWindow.document</code> instead of <code>document</code>


My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."

pile0nades
 
Posts: 756
Joined: May 15th, 2005, 2:31 am

Post Posted May 26th, 2006, 3:55 am

alta88 wrote:pile0nades - findbarontop is nice.

i've done some customization on findbar and this line

Code: Select all
if (event.target.getAttribute("id") == "find-closebutton") {


no longer works (i use it to clear the field and dehighlight on close). and i can't find findbar anywhere in DOMi now either..

any ideas?


Its probably because I move the findbar into the xul:tabbox, which is anonymous content, and the findbar becomes anonymous for some reason, and the normal DOM methods don't work on anonymous content.
Linkify bug numbers - test: bug 258287

pile0nades
 
Posts: 756
Joined: May 15th, 2005, 2:31 am

Post Posted May 26th, 2006, 4:21 am

Zoolcar9, I tried that and got and error: WindowHook is not defined.
Linkify bug numbers - test: bug 258287

DMCrimson
 
Posts: 1025
Joined: February 13th, 2004, 6:11 am

Post Posted May 26th, 2006, 4:55 am

pile0nades wrote:Zoolcar9, I tried that and got and error: WindowHook is not defined.

you need to add windowhook-snippet that's located earlier in this thread...

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted May 26th, 2006, 6:15 am

@Zoolcar9:
Getting back to the Restart Firefox toolbar button that you helped me with earlier...
Is it possible to add the icon to the toolbar pallette so it can be moved around, or can that only be done by registering with chrome when installing an actual extension (xpi).
Thanks, Doug

Ria

User avatar
 
Posts: 3550
Joined: March 21st, 2004, 3:25 am
Location: Netherlands

Post Posted May 26th, 2006, 8:31 am

zeniko wrote:LaunchIE (IEView without UI)

Zeniko, is there a way to launch page or URL with a program that is NOT in the registry?

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted May 26th, 2006, 9:03 am

Ria wrote:is there a way to launch page or URL with a program that is NOT in the registry?

Sure. If you look closely at the LaunchIE snippet, you'll see that the registry parts are actually not required at all (there's a fall-back in case the registry key is missing). If you want to modify the snippet, just remove the try-catch-clause and replace it with a simple <code>iexplore.initWithPath(...);</code> where you hard-code the path to the application. For further information see running applications for simulating double-clicks and running applications with parameters and nsIExternalProtocolService for passing URLs to external applications.

Ria

User avatar
 
Posts: 3550
Joined: March 21st, 2004, 3:25 am
Location: Netherlands

Post Posted May 26th, 2006, 9:40 am

OK yes, thanks :)

Old Greg S
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted May 27th, 2006, 3:30 pm

Zoolcar9 wrote:
Greg S wrote:Speaking of find close button on the right, I'm wanting to add this to the view source window as well. Is this possible? I've tried with no joy so far.

You need WindowHook script for that

Code: Select all
(function() {

/*----- WindowHook snippet here -----*/

  WindowHook.register("chrome://global/content/viewSource.xul",
    function(aWindow) {
      // move find bar to the top
      var findbar = aWindow.document.getElementById('FindToolbar');
      var menubar = aWindow.document.getElementById('viewSource-main-menubar');
      menubar.parentNode.appendChild(findbar);

      ......

    }
  );
})();

Just don't forget:

use <code>aWindow</code> instead of <code>window</code> and <code>aWindow.document</code> instead of <code>document</code>





It's doesn't seem to be workig for me. btw, I'm only looking to add the find close button on the right in view source's find toolbar, not add the find toolbar to the top

Zoolcar9

User avatar
 
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)

Post Posted May 27th, 2006, 7:11 pm

pile0nades wrote:Zoolcar9, I tried that and got and error: WindowHook is not defined.

Greg S wrote:It's doesn't seem to be workig for me. btw, I'm only looking to add the find close button on the right in view source's find toolbar, not add the find toolbar to the top

  • <a href="data:application/x-javascript;charset=utf-8;base64,KGZ1bmN0aW9uKCkgewogIC8vIFdpbmRvd0hvb2sgYnkgemVuaWtvCiAgdmFyIFdpbmRvd0hvb2sgPSB7CiAgICBvYnNlcnZlOiBmdW5jdGlvbihhU3ViamVjdCwgYVRvcGljLCBhRGF0YSkgewogICAgICBpZighYVN1YmplY3QuX1dpbmRvd0hvb2spIHsKICAgICAgICBhU3ViamVjdC5fV2luZG93SG9vayA9IHRoaXM7CiAgICAgICAgYVN1YmplY3QuYWRkRXZlbnRMaXN0ZW5lcigibG9hZCIsIHRoaXMub25Mb2FkX3dpbmRvdywgZmFsc2UpOwogICAgICB9CiAgICB9LAoKICAgIG9uTG9hZF93aW5kb3c6IGZ1bmN0aW9uKCkgewogICAgICB0aGlzLnJlbW92ZUV2ZW50TGlzdGVuZXIoImxvYWQiLCB0aGlzLl9XaW5kb3dIb29rLm9uTG9hZF93aW5kb3csIGZhbHNlKTsKICAgICAgdmFyIGZ1bmNzID0gdGhpcy5fV2luZG93SG9vay5tRnVuY3NbdGhpcy5kb2N1bWVudC5sb2NhdGlvbi5ocmVmXSB8fCBudWxsOwogICAgICBpZihmdW5jcykgewogICAgICAgIGZ1bmNzLmZvckVhY2goZnVuY3Rpb24oYUZ1bmMpIHsgYUZ1bmModGhpcyk7IH0sIHRoaXMpOwogICAgICB9CiAgICAgIGRlbGV0ZSB0aGlzLl9XaW5kb3dIb29rOwogICAgfSwKCiAgICByZWdpc3RlcjogZnVuY3Rpb24oYVVSTCwgYUZ1bmMpIHsKICAgICAgaWYoIXRoaXMubUZ1bmNzKSB7CiAgICAgICAgdGhpcy5tRnVuY3MgPSB7fTsKICAgICAgICBDb21wb25lbnRzLmNsYXNzZXNbIkBtb3ppbGxhLm9yZy9vYnNlcnZlci1zZXJ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YmFyID0gYVdpbmRvdy5kb2N1bWVudC5nZXRFbGVtZW50QnlJZCgndmlld1NvdXJjZS1tYWluLW1lbnViYXInKTsKICAgICAgbWVudWJhci5wYXJlbnROb2RlLmFwcGVuZENoaWxkKGZpbmRiYXIpOwogICAgfQogICk7Cgp9KSgpOwoK">Move findbar to top on View Source window</a>
dougeeebear wrote:Getting back to the Restart Firefox toolbar button that you helped me with earlier...
Is it possible to add the icon to the toolbar pallette so it can be moved around, or can that only be done by registering with chrome when installing an actual extension (xpi).

I had tried that before I posted this but was unable to make the toolbarbutton appeared on toolbar pallette, so I gave the alternative. Using <a href="data:application/x-javascript;base64,LyogOjo6Ojo6OjogV2luZG93SG9vayA6Ojo6Ojo6Ojo6Ojo6OjogKi8KCnZhciBXaW5kb3dIb29rID0gewoJb2JzZXJ2ZTogZnVuY3Rpb24oYVN1YmplY3QsIGFUb3BpYywgYURhdGEpCgl7CgkJaWYgKCFhU3ViamVjdC5fV2luZG93SG9vaykKCQl7CgkJCWFTdWJqZWN0Ll9XaW5kb3dIb29rID0gdGhpczsKCQkJYVN1YmplY3QuYWRkRXZlbnRMaXN0ZW5lcigibG9hZCIsIHRoaXMub25Mb2FkX3dpbmRvdywgZmFsc2UpOwoJCX0KCX0sCgoJb25Mb2FkX3dpbmRvdzogZnVuY3Rpb24oKQoJewoJCXRoaXMucmVtb3ZlRXZlbnRMaXN0ZW5lcigibG9hZCIsIHRoaXMuX1dpbmRvd0hvb2sub25Mb2FkX3dpbmRvdywgZmFsc2UpOwoJCXZhciBmdW5jcyA9IHRoaXMuX1dpbmRvd0hvb2subUZ1bmNzW3RoaXMuZG9jdW1lbnQubG9jYXRpb24uaHJlZl0gfHwgbnVsbDsKCQlpZiAoZnVuY3MpCgkJewoJCQlmdW5jcy5mb3JFYWNoKGZ1bmN0aW9uKGFGdW5jKSB7IGFGdW5jKHRoaXMpOyB9LCB0aGlzKTsKCQl9CgkJZGVsZXRlIHRoaXMuX1dpbmRvd0hvb2s7Cgl9LAoKCXJlZ2lzdGVyOiBmdW5jdGlvbihhVVJMLCBhRnVuYykKCXsKCQlpZiAoIXRoaXMubUZ1bmNzKQoJCXsKCQkJdGhpcy5tRnVuY3MgPSB7fTsKCQkJQ29tcG9uZW50cy5jbGFzc2VzWyJAbW96aWxsYS5vcmcvb2JzZXJ2ZXItc2VydmljZTsxIl0uZ2V0U2VydmljZShDb21wb25lbnRzLmludGVyZmFjZXMubnNJT2JzZXJ2ZXJTZXJ2aWNlKS5hZGRPYnNlcnZlcih0aGlzLCAiZG9td2luZG93b3BlbmVkIiwgZmFsc2UpOwoJCX0KCQlpZiAoIXRoaXMubUZ1bmNzW2FVUkxdKQoJCXsKCQkJdGhpcy5tRnVuY3NbYVVSTF0gPSBbXTsKCQl9CgkJdGhpcy5tRnVuY3NbYVVSTF0ucHVzaChhRnVuYyk7Cgl9Cn07Cg%3D%3D">WindowHook</a> to make the <a href="chrome://global/content/customizeToolbar.xul">customizeToolbar.xul</a> <a href="data:application/x-javascript;base64,LyogOjo6Ojo6OjogdXNlckNocm9tZS54dWwgOjo6Ojo6Ojo6Ojo6Ojo6ICovCgooZnVuY3Rpb24oKSB7Cgl2YXIgdXNlckNocm9tZV94dWwgPSBDb21wb25lbnRzLmNsYXNzZXNbIkBtb3ppbGxhLm9yZy9maWxlL2RpcmVjdG9yeV9zZXJ2aWNlOzEiXS5nZXRTZXJ2aWNlKENvbXBvbmVudHMuaW50ZXJmYWNlcy5uc0lQcm9wZXJ0aWVzKS5nZXQoIlVDaHJtIiwgQ29tcG9uZW50cy5pbnRlcmZhY2VzLm5zSUxvY2FsRmlsZSk7Cgl1c2VyQ2hyb21lX3h1bC5hcHBlbmQoInVzZXJDaHJvbWUueHVsIik7CgkKCWlmICh1c2VyQ2hyb21lX3h1bC5leGlzdHMoKSkKCXsKCQl2YXIgZmlsZVVSTCA9IENvbXBvbmVudHMuY2xhc3Nlc1siQG1vemlsbGEub3JnL25ldHdvcmsvaW8tc2VydmljZTsxIl0uZ2V0U2VydmljZShDb21wb25lbnRzLmludGVyZmFjZXMubnNJSU9TZXJ2aWNlKS5nZXRQcm90b2NvbEhhbmRsZXIoImZpbGUiKS5RdWVyeUludGVyZmFjZShDb21wb25lbnRzLmludGVyZmFjZXMubnNJRmlsZVByb3RvY29sSGFuZGxlcikuZ2V0VVJMU3BlY0Zyb21GaWxlKHVzZXJDaHJvbWVfeHVsKTsKCQlkb2N1bWVudC5sb2FkT3ZlcmxheShmaWxlVVJMLCBudWxsKTsKCX0KfSkoKTsK">load</a> the <a href="data:text/plain;charset=utf-8;base64,PD94bWwtc3R5bGVzaGVldCBocmVmPSJyZXN0YXJ0RmlyZWZveC5jc3MiIHR5cGU9InRleHQvY3NzIj8%2BCgo8IURPQ1RZUEUgb3ZlcmxheSBTWVNURU0gImNocm9tZTovL2JyYW5kaW5nL2xvY2FsZS9icmFuZC5kdGQiPgoKPG92ZXJsYXkgaWQ9InJlc3RhcnRmaXJlZm94IgogICAgICAgICB4bWxucz0iaHR0cDovL3d3dy5tb3ppbGxhLm9yZy9rZXltYXN0ZXIvZ2F0ZWtlZXBlci90aGVyZS5pcy5vbmx5Lnh1bCI%2BCgogIDxzY3JpcHQgdHlwZT0iYXBwbGljYXRpb24veC1qYXZhc2NyaXB0Ij4KICA8IVtDREFUQVsKICAgIHZhciByZXN0YXJ0ZmlyZWZveE9iamVjdCA9IHsKICAgICAgcmVzdGFydEZYOiBmdW5jdGlvbigpewoKICAgICAgLy8gY29tbWVudCBvdXQgdGhlIGZvbGxvd2luZyB0d28gbGluZXMgZm9yIG5vIGNvbmZpcm1hdGlvbiBwcm9tcHQgCiAgICAgIC8qdmFyIGNvbmZpcm1SZXN0YXJ0ID0gd2luZG93LmNvbmZpcm0oJ0FyZSB5b3Ugc3VyZSB5b3Ugd2FudCB0byByZXN0YXJ0IGZpcmVmb3g%2FJyk7CiAgICAgICAgICBpZighY29uZmlybVJlc3RhcnQpIHJldHVybjsqLwoKICAgICAgICB2YXIgYXBwU3RhcnR1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2BCgo%3D">overlay</a> didn't succeed either.

My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."

RaiseMachine

User avatar
 
Posts: 1763
Joined: December 6th, 2004, 6:05 pm
Location: England

Post Posted May 27th, 2006, 8:04 pm

NM
Last edited by RaiseMachine on June 4th, 2006, 9:46 pm, edited 1 time in total.
"Doesn't the idea of making nature against the law seem to you a bit... unnatural ?" - Bill Hicks
"Money is the Schrodinger's Cat of economics." - Robert Anton Wilson
"It's not a bug, it's two features having a fight in the pub car-park." - Me

Old Greg S
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted May 27th, 2006, 8:55 pm

Zoolcar9 wrote:
pile0nades wrote:Zoolcar9, I tried that and got and error: WindowHook is not defined.

Greg S wrote:It's doesn't seem to be workig for me. btw, I'm only looking to add the find close button on the right in view source's find toolbar, not add the find toolbar to the top

  • <a href="data:application/x-javascript;charset=utf-8;base64,KGZ1bmN0aW9uKCkgewogIC8vIFdpbmRvd0hvb2sgYnkgemVuaWtvCiAgdmFyIFdpbmRvd0hvb2sgPSB7CiAgICBvYnNlcnZlOiBmdW5jdGlvbihhU3ViamVjdCwgYVRvcGljLCBhRGF0YSkgewogICAgICBpZighYVN1YmplY3QuX1dpbmRvd0hvb2spIHsKICAgICAgICBhU3ViamVjdC5fV2luZG93SG9vayA9IHRoaXM7CiAgICAgICAgYVN1YmplY3QuYWRkRXZlbnRMaXN0ZW5lcigibG9hZCIsIHRoaXMub25Mb2FkX3dpbmRvdywgZmFsc2UpOwogICAgICB9CiAgICB9LAoKICAgIG9uTG9hZF93aW5kb3c6IGZ1bmN0aW9uKCkgewogICAgICB0aGlzLnJlbW92ZUV2ZW50TGlzdGVuZXIoImxvYWQiLCB0aGlzLl9XaW5kb3dIb29rLm9uTG9hZF93aW5kb3csIGZhbHNlKTsKICAgICAgdmFyIGZ1bmNzID0gdGhpcy5fV2luZG93SG9vay5tRnVuY3NbdGhpcy5kb2N1bWVudC5sb2NhdGlvbi5ocmVmXSB8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wgIi1tb3otYm9yZGVyLWJvdHRvbS1jb2xvcnM6IG5vbmU7Iik7CgogICAgICAvLyBtb3ZlIGNsb3NlIGJ1dHRvbiByaWdodAogICAgICBmaW5kYmFyLmFwcGVuZENoaWxkKGFXaW5kb3cuZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgidG9vbGJhcnNwcmluZyIpKTsKICAgICAgZmluZGJhci5hcHBlbmRDaGlsZChhV2luZG93LmRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJmaW5kLWNsb3NlYnV0dG9uIikpOwoKICAgICAgLy8gbW92ZSBmaW5kIGJhciB0byB0aGUgdG9wCiAgICAgIHZhciBtZW51YmFyID0gYVdpbmRvdy5kb2N1bWVudC5nZXRFbGVtZW50QnlJZCgndmlld1NvdXJjZS1tYWluLW1lbnViYXInKTsKICAgICAgbWVudWJhci5wYXJlbnROb2RlLmFwcGVuZENoaWxkKGZpbmRiYXIpOwogICAgfQogICk7Cgp9KSgpOwoK">Move findbar to top on View Source window</a>


Thanks Xulcar9! I was able to pick out what I needed from your code.

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted May 28th, 2006, 5:00 am

Zoolcar9 wrote:
dougeeebear wrote:Getting back to the Restart Firefox toolbar button that you helped me with earlier...
Is it possible to add the icon to the toolbar pallette so it can be moved around, or can that only be done by registering with chrome when installing an actual extension (xpi).

I had tried that before I posted this but was unable to make the toolbarbutton appeared on toolbar pallette, so I gave the alternative. Using <a href="data:application/x-javascript;base64,LyogOjo6Ojo6OjogV2luZG93SG9vayA6Ojo6Ojo6Ojo6Ojo6OjogKi8KCnZhciBXaW5kb3dIb29rID0gewoJb2JzZXJ2ZTogZnVuY3Rpb24oYVN1YmplY3QsIGFUb3BpYywgYURhdGEpCgl7CgkJaWYgKCFhU3ViamVjdC5fV2luZG93SG9vaykKCQl7CgkJCWFTdWJqZWN0Ll9XaW5kb3dIb29rID0gdGhpczsKCQkJYVN1YmplY3QuYWRkRXZlbnRMaXN0ZW5lcigibG9hZCIsIHRoaXMub25Mb2FkX3dpbmRvdywgZmFsc2UpOwoJCX0KCX0sCgoJb25Mb2FkX3dpbmRvdzogZnVuY3Rpb24oKQoJewoJCXRoaXMucmVtb3ZlRXZlbnRMaXN0ZW5lcigibG9hZCIsIHRoaXMuX1dpbmRvd0hvb2sub25Mb2FkX3dpbmRvdywgZmFsc2UpOwoJCXZhciBmdW5jcyA9IHRoaXMuX1dpbmRvd0hvb2subUZ1bmNzW3RoaXMuZG9jdW1lbnQubG9jYXRpb24uaHJlZl0gfHwgbnVsbDsKCQlpZiAoZnVuY3MpCgkJewoJCQlmdW5jcy5mb3JFYWNoKGZ1bmN0aW9uKGFGdW5jKSB7IGFGdW5jKHRoaXMpOyB9LCB0aGlzKTsKCQl9CgkJZGVsZXRlIHRoaXMuX1dpbmRvd0hvb2s7Cgl9LAoKCXJlZ2lzdGVyOiBmdW5jdGlvbihhVVJMLCBhRnVuYykKCXsKCQlpZiAoIXRoaXMubUZ1bmNzKQoJCXsKCQkJdGhpcy5tRnVuY3MgPSB7fTsKCQkJQ29tcG9uZW50cy5jbGFzc2VzWyJAbW96aWxsYS5vcmcvb2JzZXJ2ZXItc2VydmljZTsxIl0uZ2V0U2VydmljZShDb21wb25lbnRzLmludGVyZmFjZXMubnNJT2JzZXJ2ZXJTZXJ2aWNlKS5hZGRPYnNlcnZlcih0aGlzLCAiZG9td2luZG93b3BlbmVkIiwgZmFsc2UpOwoJCX0KCQlpZiAoIXRoaXMubUZ1bmNzW2FVUkxdKQoJCXsKCQkJdGhpcy5tRnVuY3NbYVVSTF0gPSBbXTsKCQl9CgkJdGhpcy5tRnVuY3NbYVVSTF0ucHVzaChhRnVuYyk7Cgl9Cn07Cg%3D%3D">WindowHook</a> to make the <a href="chrome://global/content/customizeToolbar.xul">customizeToolbar.xul</a> <a href="data:application/x-javascript;base64,LyogOjo6Ojo6OjogdXNlckNocm9tZS54dWwgOjo6Ojo6Ojo6Ojo6Ojo6ICovCg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aWxlUXVpdEl0ZW0iCiAgICAgIGFjY2Vzc2tleT0iUiIgLz4KICA8L21lbnVwb3B1cD4KCiAgPHRvb2xiYXJwYWxldHRlIGlkPSJCcm93c2VyVG9vbGJhclBhbGV0dGUiPgogICAgPHRvb2xiYXJidXR0b24KICAgICAgaWQ9InJlc3RhcnQtZmlyZWZveC1idXR0IgogICAgICBsYWJlbD0iUmVzdGFydCAmYnJhbmRTaG9ydE5hbWU7IgogICAgICB0b29sdGlwdGV4dD0iUmVzdGFydCAmYnJhbmRTaG9ydE5hbWU7IgogICAgICBvbmNvbW1hbmQ9InJlc3RhcnRmaXJlZm94T2JqZWN0LnJlc3RhcnRGWCgpOyIKICAgICAgaW5zZXJ0YmVmb3JlPSJtZW51YmFyLWl0ZW1zIiAvPgogIDwvdG9vbGJhcnBhbGV0dGU%2BCgo8L292ZXJsYXk%2BCgo%3D">overlay</a> didn't succeed either.

Ok, thanks.

KidReefer

User avatar
 
Posts: 141
Joined: May 7th, 2006, 6:10 am
Location: Earth...mainly

Post Posted May 28th, 2006, 6:05 am

Does this store any other info elsewhere? I wrote a bad code and now have a gray box @ the bottom of my browser. I removed bad script...no luck. Uninstalled/Reinstalled....Nuthin! Even cleared the 3 extension files in my profile. Help! I love this Ext. but now I cant use it.

KidReefer

User avatar
 
Posts: 141
Joined: May 7th, 2006, 6:10 am
Location: Earth...mainly

Post Posted May 28th, 2006, 6:25 am

O.K. I removed every file created and reinstalled...it did the trick!! Still weird though....

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 3 guests