📜 ⬆️ ⬇️

Two Pane Bookmark Manager for Firefox on ExtJS

Greetings to habrazhiteli. I would like to talk about my expansion and ask for some help.
The extension is called Total bookmarks, since its interface is almost entirely borrowed from Total commander.

image


Why do you have to do it at all?


Indeed, many people put their bookmarks in previously created folders and never encounter rubble in which it is difficult to find something. Unfortunately, at one point, I realized that I did not belong to them. If I come across an interesting article that I don’t have time to read now, then I put the bookmark right at the root so as not to forget, and then I forget about the article itself and about the bookmark. And one day, scrolling through the list of bookmarks for about 15 seconds, I realized that it was time to deal with this rubble. The problem was that the standard Firefox interface is completely unsuitable for such tasks. For example, if I want to move important bookmarks from the end of the list to the beginning, I have to drag them with the mouse for 15 seconds or more. And considering how many bookmarks I have accumulated, the whole process could take hours with such a pace. The only convenient interface in this situation seemed to me a two-pane TC interface, but I could not find any implementations on the Internet. Actually, laziness before dull and tedious work of dragging bookmarks with a mouse made me spend much more time on more intellectual work that would solve the problem once and for all.
')

Why such a strange (and many will say brake) choice, like ExtJS?


The fact is that the standard XUL, although fast, is extremely poor and non-extensible. For example, I needed a table whose lines can contain multi-line text with different formatting for each of these lines. The Firefox bug tracker even has a task: make table rows multi-line, but it hangs there for many years, and you can't add such support yourself. In addition, the richness of the component palette with ExtJS is unlikely to be compared to some other library. Well, and besides, at that moment I was just mastering it in connection with another project.

Of course, ExtJS has one serious drawback that spoils life. And I'm not talking about the stagnation that the developers themselves are struggling with, and if used correctly, which can be minimized or hidden altogether. I’m talking about the unspoken policy of Sencha: not to release a release until a fixed (and not so insignificant) number of bugs is added to the project, which you, as a library user, will have to figure out on your own. Even if you are actively writing bug reports, then you should not think that with the release of the new version, something will change, because *cm. private policy of the company :)
However, the pros outweigh the cons.

About functionality


Almost all the functionality is visible in the screenshot. The extension is mainly intended for convenient manipulation of bookmark groups. Here are some highlights:

Separately, I just want to note that testing under macOS was carried out after the readiness of almost all the functionality (more precisely, on the hackintosh under the virtual machine, since the Mac was not at hand) and noticed that F9 assigned to delete in the poppy is already doing something system therefore, makovodam will have to press ctrl again. If someone does not intercept F9, it will work as well as on other axes.

Little about implementation


As you know, most JS libraries cannot be directly used in XUL. There are some forks for jQuery, etc., but all this is far from a stable result. However, there is a way out for those extensions that do not interact via plug-in libraries with the XUL-part of the interface. You just need to create an iframe for the whole window and it already has to work with regular html and familiar JS libraries.

For building in the Mozilla documentation, it is suggested to use make, but since since I worked with gradle before, I used it. I believe that in any case it is more convenient, since it is possible to connect standard java-libraries directly in the script. In my case, I don’t even know what else it would be possible to implement an assembly without writing separate utilities, since I had to do a simple replacement for SenchaCMD because of * see. The unspoken policy of the company Sencha.

What I wanted to ask Habr


To my great disappointment, I have not been able to upload my extension to addons.mozilla.org for two months. It all started with the fact that automatic tests when loading extensions fell due to the use of ExtJS. This was corrected immediately after talking to the editors. Then I waited for the queue for a couple of weeks and rejected the extension, since I forgot to attach the source code. Then a couple of weeks passed due to the fact that I did not immediately understand how to start the test again. My questions were not answered quickly, and the language barrier affected. Some letters remained unanswered. But that's not the point, it is clear that the editors have a lot of work to pay due attention to everyone.

After the last check I received a letter with the following answer:
Familiarize
Your add-on, Total bookmarks 2.2.2801308201235, has been reviewed in our gallery.

Reviewer:
Kris maglione

Comments:
Your version was rejected because of the following problems:

1) Your add-on creates the DOM nodes from the HTML strings containing unsanitized data, through document linking, or through similar means. This is a major security risk. For more information, see developer.mozilla.org/en/XUL_School/DOM_Building_and_HTML_Insertion

2) Your add-on uses the 'eval' function or Function constructor unnecessarily. There are many reasons: * not * to use 'eval', and also it’s possible to use it. You can read more about it here: developer.mozilla.org/en/XUL_School/Appendix_C : _Avoid_using_eval_in_Add-ons

This isn’t the following issues:

1) This completely freezes my browser.

Please fix it again. Thank you.

This version of your add-on has been disabled. You may re-request review by addressing the editor's comments and uploading a new version. To learn more about the review process, please visit addons.mozilla.org/developers/docs/policies/reviews#selection

If you have any questions or comments, please click here. # Amo-editors on irc.mozilla.org
- Mozilla Add-ons
addons.mozilla.org

In short: the editor just hung the browser. The problem is that I tested on many machines, on different operating systems and at the same time everything worked for both me and my friends without any problems. Therefore, according to such a report as “everything is lost and nothing works,” I absolutely do not understand where to look for the problem. Perhaps the editor had a conflict with some samopisny extension (he has about 14 of them and part of it to check the operation of the extensions).

In general, I will be extremely grateful if someone can hang up my browser with my extension and give a feedback about this. Otherwise, I still can not put the addon on the site Mozilla.

Repository
bitbucket.org/cs0ip/total-bookmarks

If you can not write feedback in the comments or PM, then write here: cs0ip@ya.ru

upd: Less than a year has passed (although a little more ...):
addons.mozilla.org/firefox/addon/total-bookmarks

Source: https://habr.com/ru/post/192358/


All Articles