A hack for normalizing imported nested list of tabs from Tree Style Tabs in Firefox or LibreWolf

Background, feel free to skip:

I use Tree Style Tabs (often shortened to TST), which, once I have removed the tabs on the top (explained under “How to hide the top tab bar (horizontal tab strip)?” on the page I linked makes for a muck much better “research” interface in Firefox and Firefox clones like LibreWolf.

Tree Style Tabs shows tabs on the left side of the browser which is great with todays websites on widescreens displays but the real genius is that when I ctrl-click or select open in new tab, then it opens in a new tab under the current one and indented by a small step. This means that as I read through search results I ctrl click each interesting one and then as I read through them I ctrl click every interesting link that I see as I skim through it. This lets me focus and not worry that I need to go back to about one thirds down the last page I was on and check whatever reference documentation it linked to.

A bonus is the three of tabs now often looks contains a reasonable representation of the topic from my viewpoint, and it can be exported to markdown using this plugin to TST which leads me to the point of this post:

How to import nested markdown links from Firefox or Librewolf to Logeq

  1. First I select the tabs in the tree that I want to import
  2. Second I copy them into Logseq
  3. I then open the page in VS Code
  4. I use regex search and replace (the .* symbol in the search field) to automatically adjust the indentation to Logseq standards by using
  • ^(.*) \* \[ in the search field and
  • $1- [ in the replace field

I’ll try to get back and expand this with screenshots and examples if anyone is interested.