Bring TMP legacy to FF78+ (and so the Waterfox current 78 in future)?

Issue #2 resolved
Former user created an issue

WE is not future it just won't go anywhere.

And legacy addon can still run on FF dev with some not so complex help Link Text. Waterfox current is on its way to be update to FF ESR78 and they are planning a extension store for it Link Text. The addon it shelf have to be convert to bootstrap indeed and have to compensate for all the changes FF have gone through but its not impossible to do and not that difficult. I've done update Quicksaver's Tab-Groups to FF dev 78+ in within 2 months by simply tinkering here and there Link Text. That maybe because Tab-Groups is already a bootstrap addon but I think it prove such thing is not impossible.

Please consider.

Comments (12)

  1. l hw

    I'm afraid there is nothing like a formal documentation or tutorials apart from old mozilla docs on how to make addon restartless. I fixed Tab-Groups by load it into the FF then fix every error shows up in console.

    I’m trying to point out several things that may be helpful base on my memory here.

    • XBL is gone and been replaced by the web-component, XUL is still here but they become web-component custom elements which still under old xul namespace and have to be create with .createXULElement() . Many FF UI elements are in this way (tab,menuitem, popup, stack, toolbutton etc.).
    • For TMP I think a mutationObserve could be use to replace xbl binding and monitor tabbar and tabs and edit them after they have been created. hopefully adding progress meter, indicators for several tab functions and other properties to tabs could be done this way.
    • xiaoxiaoflood created that bootstrapLoader and also modified many extensions to run on new system they are very good references.
    • XUL change affect mostly on addon’s option UI especially the <prefereference/> is complete gone but xiaoxiaoflood have made a custom elements for the tag in his S3download port. I think if you just want to fix TMPs option window on new FF that one is a very good reference.
    • FF now won’t process .xul file properly they have to be rename to .xhtml .
    • Since extension can only be bootstrap now extension have to do overlay work themselves. xiaoxiaoflood has a overlay engine in most of his port which could be useful. Tab-Groups also has one but is more complex I manage to make it work on new FFs but that's all I can do.
    • For overlay toolbox palette where the button on toolbar is actually located in DOM can no longer be found via .getElementById() since it in shadow-DOM now and don’t have an id but there is a gNavToolbox.palette property for it.
    • Task.jsm is gone since JS now have async and await. I’ve searched TMP’s code and not see this has been used but I still mention it here since it may be useful.
    • Several things have changed their name e.g.: setWindowValue → setCustomWindowValue. This change usually come in pairs not that much in fact.
    • FF now switch to another tab before close current selected tab.

  2. onemen repo owner

    It look like i have to refactor most of Tab mix code.

    Do you know if extension can access gBrowser or the tabBrowser.

    I think that without it i can’t implement multi-row

  3. l hw

    Hello,

    I recently just got some time to further looking into the TMP’s code. And I would like to recommend modify option window first since this part is entirely XUL and very XBL heavy and I would like to assume it gonna involve as much as half of the total work. But once it is done it should not be require any change for a very long time. I also assume this part may be worked stand along? since it not look like to require any other parts of the code to work. Next I think a JS script that replace the function of “tabbrowser_4.xml” could be build as the XBL binding is gone. This thing should also be able to be worked stand along with the customJS loader. After these is finished the “bootstrap.js” and overlay module could be incorporate into the addon these two could use code of others thus should not take too much time. With the overlay module the JS script replacing the XBL binding should be arrange to be load before main TMP script but after the CSS style sheet. And then I guess at this point the addon could have a very large possibility of be successfully load by the browser and some of the basic functions may just working as fine. Then what left is test addon thoroughly and fix every JS problem. This part may not take too much work as the JS codes that functioning on themselves could be used without any change but it indeed take time to do.

  4. Xiao Fleud

    Our best friend to find out which change caused each incompatibility is mozregression. Usually the fix is in the diff or in related bugs. Even the bootstrapLoader code is not mine, it was done by a Mozilla guy, then inserted into Thunderbird.

    In my experience, things are quite easy after de-XBL, just minor tweaks here and there. If you can get to Fx 72, then you’re fine. From there to current version is easy.

    But starting the work now must be hard, kudos to “117649”. I’ve been fixing things version by version since Fx 57. In fact, for many addons even before that, when I made them e10s compatible.

    Besides Tab Groups, BackTrack Tab History was another legacy addon to join our bootstrapLoader train. And there are some simpler ones I rewrote as UCJS, like Private Tab. UCJS (UserChromeJS scripts) are like UserScripts with the same power as legacy addons. I just didn’t implement auto update, but even that each UCJS can implement it by itself.

    There’s even an UCJS for Multirow Tabs, since you mentioned that. I haven’t tested it as I use Tree Style Tab.

    https://github.com/Endor8/userChrome.js/tree/master/Mutirowtabs/Firefox-81

  5. l hw

    Waterfox G3 just dropped.

    And since onemen hasn’t been around for a while I’ve start doing some work on convert TMP.

    The progress is slow of course. I’ve been able to load the overlay elements (toolbar buttons, menu items) into browser.xhtml with a modified Overlay.jsm and by replace xbl with custom element I can make option window display without it be some red error messages. No moving part should be working at this point since there is barely any work has been done on fix java-script.

    I’m sharing everything on my github dump that I made during last down-time of this repo. Everything I’ve changed is in the beyond branch everyone is welcomed to took it as their start. Please be aware that .xpi file should always be the newest code since I’m working on this by direct edit it.

  6. onemen repo owner

    Thank you all.

    I’v just created new repository in GitHub for TabMixPlus, please create PR to this repository with your changes.

    lets continue this convertasion in the new repository

  7. Log in to comment