0

I know now how to make a simple firefox extensions, but I need somebody's help with making bookmarks more useful. Now, then I hold mouse cursor for a few seconds above any bookmark in the bookmark sidebar, it will show a little window with full name of the bookmark. I want to add to this window a little image, for example a youtube thumbnail. Can you help me?

Same, but in image: IT"S ALL I WANT

===========edit==========

===========edit==========

===========edit==========

Almost done. Can you tell me why thumbnail is so wide here? image.setAttribute("width","120px"); doesn't work.WIIIIIIIIIDER

user2547526
  • 71
  • 3
  • 14

1 Answers1

2

This question is too broad in my opinion, and doesn't show that you attempted to do any research yourself. I won't be giving you a full spoon-feed answer for that matter, as the "broadness" of your question could potentially involve quite a bit of work, maybe even hours, even for somebody with lots of experience (like me).

I'll give you some hints, anyway, to get you started:

  • The sidebar is chrome://browser/content/bookmarks/bookmarksPanel.xul, but you'll want to overlay chrome://browser/content/places/placesOverlay.xul, where the tooltip element is actually contained.
  • The tooltip itself is the bhTooltip element and children. Add new stuff, such as an xul:image, there.
  • The tooltip information is filled in via fillInBHTooltip, a function you may want to override/amend.
  • Getting the URI of a youtube thumbnails is described elsewhere already.
  • How to overlay stuff, etc. is described elsewhere in detail. (E.g. see the wiki for some links). Also MXR and DXR and the DOM Inspector are your friends.
Community
  • 1
  • 1
nmaier
  • 32,336
  • 5
  • 63
  • 78
  • Would XBL be a better solution instead of `loadOverlay`? – Noitidart Aug 06 '14 at 18:31
  • Thank you, incredibly helpful. Can you give me just one more hint? After I added image into vbox, it's sizes are uncorrect. I uploaded screenshot into the question.https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Tutorial/Modifying_a_XUL_Interface – user2547526 Aug 26 '14 at 18:03
  • @user2547526 Set `flex` attribute on the image to `0` – Noitidart Aug 26 '14 at 19:34
  • @user2547526 you should also plus one his answer, thats the least you can do man. it shows appreciation. you checked the solution which is great, now just hit the up arrow this is a good answer. – Noitidart Aug 27 '14 at 07:20