Tree Tabs



  • @dsl101 said in Tree Tabs:

    Question: How to move the Tree Tabs installation folder.

    I hadn't realised the implications at the beginning, but I installed the extension from a folder on my desktop. I'd like to move it somewhere more appropriate, but I found that I couldn't 'keep' the tree of tabs I'd created. So I was wondering where the metadata for that is kept, and if it's possible to copy it to a 'new' installation of TT from a new folder location. Clearly it's not in the folder itself or it would come across. I'm assuming localStorage, so would it need an 'Export' button like for the theme? Could it be done by hand (since I only need to move it once)?

    Many thanks.

    Yes you need to copy localstorage data file. It will be tricky, but I think you can do it :)
    Copy Tree tabs somewhere and add it in vivaldi, following steps from my first post. After that you will have two tree tabs extensions. Now take a note of Web panel urls of both, from options pages (Url for the Web Panel text box on top) it will be something like "chrome-extension://mojomcagnbmmkbkfognoilmkmkllkioa/sidebar.html"

    What you need, are those random letters in front, in my case "mojomcagnbmmkbkfognoilmkmkllkioa"

    Now you will have to navigate to your Vivaldi profile and find both local storage files, it should be:
    C:\Users%USERNAME%\AppData\Local\Vivaldi\User Data\Default\Local Storage

    local storage files will have chrome-extension_ + those letters from above + _0.localstorage
    don't mind -journal files, those are 0 bytes and are not considered in any way.

    Now close vivaldi, so the files are not locked, and now switch names of those files. After that run vivaldi and you will have switched trees and all options ;)
    Remove tree tabs you don't want to keep.



  • @dsl101 said in Tree Tabs:

    Sorry for the deluge of questions, but here's another. To figure out CSS changes, I find the Inspector page very useful, but since TT captures right click, it's not possible to open the inspector on the web panel, and the shortcut (CTRL+SHIFT+I) targets the main page not the panel. Would it be possible to not capture the right-click if, say, CTRL was held down, and instead allow Vivaldi to handle the event to show the regular menu? I made these quick changes to menu_tabs.js and it works for me (might need better cross-browser coding for FF though):

    // trigger action when the contexmenu is about to be shown
    $(document).bind("contextmenu", function(event) {
    if(event.ctrlKey === false) {
    event.preventDefault();
    }
    });

    // show menu
    $(document).on("mousedown", "#pin_list, #tab_list, .tab, .pin", function(event) {
    event.stopPropagation();
    if (event.button == 2 && event.ctrlKey === false) {

    I didn't want regular people (that has no knowledge in programming) to poke around. But yeah, I was thinking maybe a checkbox in options? Something like "Debug mode"



  • @dsl101 Ok, good catch. I will update the code.

    Ok, I did another change. Try this so you don't end up with an empty tab in front.
    I can't upload an update to google drive right now, as I have some changes that cause some warnings and some nasty bugs. I will upload update in a week or so. For now try this:

    function DetachTabs(tabsIds){
    	chrome.windows.get(CurrentWindowId, {populate : true}, function(window){
    		if (window.tabs.length == 1){
    			return;
    		}
    		chrome.windows.create({state:window.state}, function(new_window){
    			chrome.tabs.move(tabsIds[0], {windowId: new_window.id, index:-1});
    			for (var i = 1; i < tabsIds.length; i++){
    				chrome.tabs.move(tabsIds[i], {windowId: new_window.id, index:-1});
    			}
    			chrome.tabs.update(tabsIds[0], {active: true});
    			setTimeout(function(){
    				chrome.tabs.remove(new_window.tabs[0].id, null);
    			},500);
    		})
    	});
    }


  • @kroppy I think the problem with a checkbox is that you want to be able to switch between the 2 context menus easily, so for me the CTRL key made sense. I guess you could guard that CTRL key with a debug option, but really, what's the harm in non-techies finding the original menu?



  • Hi, thanks for extension. It is really amazing!

    I prepared dark theme for Tree Tabs, you can use it, if you want:
    https://raw.githubusercontent.com/kvaps/dotfiles/master/vivaldi/treetab_dark.tt_theme

    Screenshot:
    alt text



  • @kroppy said in Tree Tabs:

    @luetage said in Tree Tabs:

    @kroppy Yeah, makes sense, but it's still nicer operating it packed instead of loading it unpacked. How about putting it on github so that we can just pull it with command line, instead of downloading it from google drive?

    Because I hate git? I use svn... Oh well, when I will have time I will put it there. But expect to some branches to appear from nowhere since I don't have much experience with git. ;)

    It looks like github has some support for svn clients. I don't know subversion, but I do know git pretty well. I'd be happy to try to help you set up a repo that would let you keep using familiar commands.

    Hell, I'd even be willing to pick up a bit of subversion syntax and help you port your history (if that's possible).



  • Hello and thanks for Tree Tabs!

    I just tried it in Firefox Nightly, and Tree Tabs doesn't seem to know why new tabs are opened, leading to them not being added as a child of the current tab. I can tell TT to place all new tabs as a child of the current tab, but this isn't fantastic behaviour when I want to start a new tree.

    Is this a TT bug or firefox limitation?

    Oh, and I'd love for TT to have an export tree function - possibly expanded to an automated tree backup system. I might have a bash at adding this myself if this addon was on github :)



  • Sorry for my absence for 3 weeks, I've been busy...

    @dsl101 Yeah, you are right I will add CTRL+RMB Click.



  • @kvaps Thanks man, I will upload it to google drive :)



  • @xtav Cool to know. I'm not familiar with commands either, I know only few... I use tortoise SVN on local server, that my brother set up for me.
    You guys really want that on github don't ya?



  • @ripdog said in Tree Tabs:

    Is this a TT bug or firefox limitation?

    Yes.
    It's new web extensions API limitation in Firefox, Tab object does not provide "openerTabId", which is present in any chromium browser. New tabs opened from a middle click, ctrl+link click, new tab button or even bookmark will not append to the tree, since new tab does not have any information which tab opened it.
    In essence there is no parent/child information.

    To somewhat mitigate lack of that, you must set "Append orphan tabs" to "treat as active's tab child" in TreeTabs options.

    Firefox team is working on it and I hope they will not ignore this issue.
    For this matter, you can check out bugzilla:
    https://bugzilla.mozilla.org/show_bug.cgi?id=1238314



  • @kroppy I can help you get your svn repo to github if you want. I've done svn->git conversions quite a few times, importing the full svn history and all if you want. I'll also volunteer to put it up on a public svn repo(or private) and just mirror it to github. I'm guessing that doing that may cause people to just fork the github version, so it's a slippery slope. If it goes to github, I would also be willing to set up a ci job so things would get built automatically, without you having to build it and upload to your google drive.

    Can't thank you enough for this, and the Opera version, but I prefer Vivaldi since I can hide the tabs at the top



  • @aflat said in Tree Tabs:

    @kroppy I can help you get your svn repo to github if you want. I've done svn->git conversions quite a few times, importing the full svn history and all if you want. I'll also volunteer to put it up on a public svn repo(or private) and just mirror it to github. I'm guessing that doing that may cause people to just fork the github version, so it's a slippery slope. If it goes to github, I would also be willing to set up a ci job so things would get built automatically, without you having to build it and upload to your google drive.

    Can't thank you enough for this, and the Opera version, but I prefer Vivaldi since I can hide the tabs at the top

    I started to setup a repo on Gitlab from version 0.0.16 as a base, now I'm quite sleepy, so I will try to upload it tomorrow. Thanks for proposition anyway :)

    Oh and there is a tricky part, I keep separated manifest.json for each browser, since this is the only difference, so I have a folder with only manifest.json file. This is one of the reasons why there are separated zip files for firefox, vivaldi and opera. All other files in my extension are unchanged for all browsers apart that one file. I will make a readme file how a user should install it. When you will download the repo, usually only version number is bumped in manifest, unless I add some additional permissions or so. So usually downloading all files but manifest should do.



  • @kroppy *shrugs* I only mention github because I know git, and github is a popular place to host git repos.

    Really, I'd just like to see some sort of system for issue tracking and version control.



  • @xtav What is there to shrug about? If he likes Gitlab better it's his decision. Seems to be pretty popular too.



  • @xtav said in Tree Tabs:

    @kroppy *shrugs* I only mention github because I know git, and github is a popular place to host git repos.

    Really, I'd just like to see some sort of system for issue tracking and version control.

    Sorry about that...
    Gitlab gives me more options and I can make private repos.



  • @kroppy As a release engineer, I actually prefer gitlab over github, but more people know of github, which is why I said it.

    Good choice :)



  • @aflat Thanks :)



  • @luetage said in Tree Tabs:

    If he likes Gitlab better it's his decision. Seems to be pretty popular too.

    Sorry, that's what I meant to get across with the shrug (i.e. I meant to say that it's ultimately his decision, and in any case, I'm not married to github over gitlab).

    I think we're on the same page here - I just miscommunicated. Apologies!



  • Thank you so much for this extension. It was the one thing annoying me about tabs on Vivaldi. But I really hope that you could add tab switching with the mouse wheel, it's a crucial feature for me. I think the Firefox addon Tab Tree had the best implementation of this feature:

    http://i.imgur.com/PI8Pf05.png

    Do you think this is possible?

    Impatient as I am and knowing very little about coding, I tried adding it myself (to SetIOEvents):

    $("#tab_list").bind("mousewheel DOMMouseScroll", function(event) {
    	event = event.originalEvent;
    	if (event.wheelDelta > 0 || event.detail < 0) {
    		ActivatePrevTab();
    	}
    	else {
    		ActivateNextTab();
    	}
    });
    

    And it works, but when you scroll too fast it only scrolls one or two tabs. Maybe chrome.tabs.update can't fire too often?


Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.