how to reverse the sort order of tabs in firefox?

Solution 1:

Here is one way to reverse the sort order of Firefox tabs:

  1. Set Firefox's homepage to currently opened tabs by selecting Use Current Pages in Preferences > Home

  2. Copy the resulting string

  3. Run this command (Here string is the copied string):

    $ echo 'string' | tr '|' '\n' | tac | tr '\n' '|' | sed 's/.$/\n/'
    
  4. Copy the string generated by above command and paste it in Custom URLs field in Preferences > Home

  5. Close all the currently opened tabs

  6. In a new fresh tab click on Home button and you're done!

Solution 2:

Maybe bookmarking all the tabs, and then reordering them in the bookmark folder. They should open in the order they are in the bookmark folder.

Solution 3:

Based on @rootkea answer above, but slightly different. His answer won't work in windows since windows doesn't have cat command (I cannot write a comment so I chose write a complete answer). Reversing those urls can be done inside a browser with javascript.

  1. Go to FF console: press Ctrl + Shift + K or use context menu -> Inspect Element and select tab Console.
  2. Paste this code there and press enter (don't close console for now)

    let ta = document.body.appendChild(document.createElement('textarea'));

    Textarea appears stretched 100% horizontally at the bottom of the current page (if you do it right on this superuser's page). Textarea is needed for convenient work with special characters in a string with urls.

    It is possible to add some styling if you don't see the element. Enter this code to console

    ta.style.border = '4px solid red';

  3. Set Firefox's homepage to currently opened tabs by selecting Use Current Pages in Preferences > Home

  4. Copy the resulting string and paste it to textarea element, created before
  5. Paste this code to console and press enter

    ta.value = ta.value.split('|').reverse().join('|');

  6. Copy new string from textarea and paste it in Custom URLs field in Preferences > Home

  7. Close all the currently opened tabs

  8. In a new fresh tab click on Home button and you're done!