tab (re)opening order
Hi. When (re)opening a number of bookmarks, e.g. from MySessions v2020.7.0 or OneTab v1.29, just recently, not before, it opens them in reverse order. Is there a way to adjust/fix/set that list top becomes left most and list bottom right most in the horizontal list of tabs? I am sure it is not those two extensions, since it worked before. Would be great if FF had a feature to reverse all tabs t1, t2, t3...t97, t98, t99 to reverse order t99, t98, t97...t3, t2, t1. How can this be done with existing FF, tools or extensions? Or is there a setting in about:config that would allow correct/reversed (re)opening order? Thank you!
Toate răspunsurile (8)
You can look at these prefs on the about:config page to see if toggling them works for you.
- browser.tabs.insertAfterCurrent
- browser.tabs.insertRelatedAfterCurrent
You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.
spdgnzls said
When (re)opening a number of bookmarks, e.g. from MySessions v2020.7.0 or OneTab v1.29, just recently, not before, it opens them in reverse order.
How recently -- Firefox 80 would have just installed in the past 48 hours.
Could you contact the authors and let them know to see whether they can fix it? Usually there is some contact information down the left side of the page on the Add-ons site.
If you want to have some fun, here's something you can test in a window with a small number of tabs. I suggest one where you can still see them all. Also, this will fail if you have any pinned tabs in the window, so only regular tabs, please.
** THIS IS EXPERIMENTAL **
In a new tab, type or paste about:debugging into the address bar and press Enter to load the page.
In the left column, click This Firefox. The page show now list your enabled extensions. Feel free to pick any of them, other than your theme, but one that is somehow related to tabs might make the most sense.
Click its Inspect button. Firefox should open a new tab showing developer tools for the extension. Click the Console tab if that one is not selected.
We're going to run some code here to flip the order of your tabs. There are two possible layouts for this tab:
(A) Multi-line code editor on the left, info on the right (B) Single-line code editor at the bottom, info above
For this case, (A) is more convenient. If you don't have the two-column layout, look for a little button at the right end of the bottom line of the console that looks similar to the Sidebars button and click that.
Here's the code to paste into the code editor, and then click Run to run it:
browser.tabs.query({currentWindow: true}).then((arrTabs) => { for (var i=0; i<arrTabs.length-1; i++){ browser.tabs.move([arrTabs[arrTabs.length-i-1].id], {index: i}); } });
So what does that do?
First it queries for a list of the tabs in the current window, which returns an array of tab objects. Next it starts counting at the first position on the bar (index zero) and moves the last tab on the list there. Then it moves the next to last tab on the list -- which is now the last on the bar, but we don't care about that, we work off the list -- to the second position on the bar (index one). And so on.
If you run it again, the order should flip back to the original. Third time reversed again. Etc.
Cool.
jscher2000 said
spdgnzls said
When (re)opening a number of bookmarks, e.g. from MySessions v2020.7.0 or OneTab v1.29, just recently, not before, it opens them in reverse order.How recently -- Firefox 80 would have just installed in the past 48 hours.
Could you contact the authors and let them know to see whether they can fix it? Usually there is some contact information down the left side of the page on the Add-ons site.
As it happened only recently, it seems it is due to FF, not their extension, hence I suggested (at similar time of posting here) to add a feature for reverse tab order.
jscher2000 said
If you want to have some fun, here's something you can test in a window with a small number of tabs. I suggest one where you can still see them all. Also, this will fail if you have any pinned tabs in the window, so only regular tabs, please. ** THIS IS EXPERIMENTAL ** In a new tab, type or paste about:debugging into the address bar and press Enter to load the page. In the left column, click This Firefox. The page show now list your enabled extensions. Feel free to pick any of them, other than your theme, but one that is somehow related to tabs might make the most sense. Click its Inspect button. Firefox should open a new tab showing developer tools for the extension. Click the Console tab if that one is not selected. We're going to run some code here to flip the order of your tabs. There are two possible layouts for this tab: (A) Multi-line code editor on the left, info on the right (B) Single-line code editor at the bottom, info above For this case, (A) is more convenient. If you don't have the two-column layout, look for a little button at the right end of the bottom line of the console that looks similar to the Sidebars button and click that. Here's the code to paste into the code editor, and then click Run to run it: browser.tabs.query({currentWindow: true}).then((arrTabs) => { for (var i=0; i<arrTabs.length-1; i++){ browser.tabs.move([arrTabs[arrTabs.length-i-1].id], {index: i}); } }); So what does that do? First it queries for a list of the tabs in the current window, which returns an array of tab objects. Next it starts counting at the first position on the bar (index zero) and moves the last tab on the list there. Then it moves the next to last tab on the list -- which is now the last on the bar, but we don't care about that, we work off the list -- to the second position on the bar (index one). And so on. If you run it again, the order should flip back to the original. Third time reversed again. Etc. Cool.
This works, and quickly. However, to get it to work, requires many steps, and is not for daily use. If htis could be made into an extension, that would be good. But great it would be to have this as FF internal function. If either cannot be done quickly, can you guide how to make this into an extension? Would probably also make others, like better bookmark management (folder search, bookmark in folder search etc). Thx!
cor-el said
You can look at these prefs on the about:config page to see if toggling them works for you.You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.
- browser.tabs.insertAfterCurrent
- browser.tabs.insertRelatedAfterCurrent
Both are set to TRUE, is that how correct (not reverse by accident) order (ie reopen history/session as saved) is achieved? Thx!
Meanwhile I have resorted to open the old sessions by clicking on each tab URL (in the session saved in OneTab), but that is not a solution, just a crutch.
spdgnzls said
jscher2000 said
Here's the code to paste into the code editor, and then click Run to run it:... can you guide how to make this into an extension?browser.tabs.query({currentWindow: true}).then((arrTabs) => { for (var i=0; i<arrTabs.length-1; i++){ browser.tabs.move([arrTabs[arrTabs.length-i-1].id], {index: i}); }});
What do you think would be the best interface? The options are one or more of the following:
(A) Toolbar button -- installs onto the main toolbar, you can move it to overflow to save space (B) Tab context menu -- right-click a tab, click "Reverse Tab Order" (C) Keyboard shortcut -- risks being easy to trigger accidentally
I lean toward B, even though the lower part of the menu gets a bit congested.
You could write this single-purpose extension in a couple of hours and get it posted on the Mozilla Add-ons site within 48 hours. In my experience, the hardest part is creating a decent icon.