A
A
Aidsoid2010-10-19 08:08:37
JavaScript
Aidsoid, 2010-10-19 08:08:37

Getting to the "Show More Bookmarks" Button in Firefox

I am developing an extension for Firefox that allows you to display the bookmarks bar by hotkey, and hide it when you click on the bookmark.
It seems like everything works great and the plugin is almost ready, but a bug was found out: if the number of bookmarks exceeds the number that fit on the screen, then the “Show more bookmarks” button appears, after clicking which a list of bookmarks that do not fit on the screen appears. So, when you click on a bookmark located inside this button/menu, the bookmark panel does not want to be automatically hidden.

Here, on the right, is this ill-fated button:
image

Tell me, how can I get to this button from javascript? And in particular, and to the elements (bookmarks) drop-down by clicking on it.

If you look through the DOM Inspector, then there seems to be this button, but you can’t get to it.

Copy Source | Copy HTML
  1. var tmp_str = '';
  2. for (i=0; i<content.childNodes.length; i++){
  3.   // Вешаю обработчик клика мышкой
  4.   content.childNodes[i].addEventListener("click", this.onMouseClick, false);
  5.   // Пытаюсь понять до какого элемента добрался (для отдалки)
  6.   tmp_str = tmp_str+ i+'node='+content.childNodes[i].nodeName+'; tag='+content.childNodes[i].tagName+'; class='+content.childNodes[i].className+'; local='+content.childNodes[i].localName+'; Type='+content.childNodes[i].nodeType+'; Value='+content.childNodes[i].nodeValue+'\n';
  7. }
  8. // Показываю весь список элементов на которые повешено событие клика мышкой (для отладки)
  9. alert(tmp_str);


You can download the extension for testing and a deeper understanding of the essence of the problem from the Firefox add-ons page .

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question