var VerticalTabs = {

    handleEvent: function(event) {
        switch (event.type) {
        case 'DOMContentLoaded':
            this.init();
            return;
        }
    },

    init: function() {
        window.removeEventListener("DOMContentLoaded", this, false);

        // Move the bottom stuff (statusbar, findbar) in with the
        // tabbrowser.  That way it will share the same (horizontal)
        // space as the brower.  In other words, the bottom stuff no
        // longer extends across the whole bottom of the window.
        var contentbox = document.getElementById("appcontent");
        var bottom = document.getElementById("browser-bottombox");
        contentbox.appendChild(bottom);

        // Move the tabs next to the app content and make them vertical
        // and place a splitter between them.
        var tabs = document.getElementById("tabbrowser-tabs");
        contentbox.parentNode.insertBefore(tabs, contentbox);
        tabs.orient = "vertical";
        tabs.mTabstrip.orient = "vertical";
        tabs.tabbox.orient = "horizontal"; // probably not necessary

        var splitter = document.createElement("splitter");
        splitter.setAttribute("id", "verticaltabs-splitter");
        splitter.setAttribute("class", "chromeclass-extrachrome");
        contentbox.parentNode.insertBefore(splitter, contentbox);

    }

};

window.addEventListener("DOMContentLoaded", VerticalTabs, false);

@@ -21,177 +21,8 @@
 %0D%0A%0D%0A
-    handleEvent: function(event) %7B%0D%0A        switch (event.type) %7B%0D%0A        case 'DOMContentLoaded':%0D%0A            this.init();%0D%0A            return;%0D%0A        %7D%0D%0A    %7D,%0D%0A%0D%0A
     
@@ -1217,24 +1217,905 @@
 entbox);%0D%0A%0D%0A
+        // Initialise tabs%0D%0A%09%09tabs.addEventListener('TabOpen', this, true);%0D%0A        for (let i=0; i %3C tabs.childNodes.length; i++) %7B%0D%0A            this.initTab(tabs.childNodes%5Bi%5D);%0D%0A        %7D%0D%0A    %7D,%0D%0A%0D%0A    initTab: function(aTab) %7B%0D%0A        aTab.setAttribute('align', 'stretch');%0D%0A        aTab.removeAttribute('maxwidth');%0D%0A        aTab.removeAttribute('minwidth');%0D%0A        aTab.removeAttribute('width');%0D%0A        aTab.removeAttribute('flex');%0D%0A        aTab.maxWidth = 65000;%0D%0A        aTab.minWidth = 0;%0D%0A    %7D,%0D%0A%0D%0A    /*** Event handlers ***/%0D%0A%0D%0A    handleEvent: function(event) %7B%0D%0A        switch (event.type) %7B%0D%0A        case 'DOMContentLoaded':%0D%0A            this.init();%0D%0A            return;%0D%0A        case 'TabOpen':%0D%0A            this.onTabOpen(event);%0D%0A            return;%0D%0A        %7D%0D%0A    %7D,%0D%0A%0D%0A    onTabOpen: function(aEvent) %7B%0D%0A        this.initTab(aEvent.originalTarget);%0D%0A
     %7D%0D%0A%0D%0A%7D;%0D

Initialise tabs as well (basically by deleting a bunch of properties)