open url in specific tab
Hi,
I'd like to open a specific URL in a specifically identified tab.
Suppose my Firefox browser is open with 3 tabs: tab 1 has support.mozilla.org loaded tab 2 has mozilla.org loaded tab 3 has www.thunderbird.net loaded
I'd like to run a shell command such as "firefox.exe https://iot.mozilla.org", but I'd also like this URL to load in tab 2, no matter where the user's focus is. Is this possible? How can I identify the Firefox tab from command line? One way would be to detect the web page title string, eg. "firefox.exe https://iot.mozilla.org --open-in-tab=\"Internet for people\"" (I just made up that option of course).
Thanks
การตอบกลับทั้งหมด (2)
To the best of my knowledge, this isn't possible. It's partly because each tab that Firefox creates is given an ID that doesn't necessarily match up to the 1, 2, 3 concept that you mentioned and it's not necessarily going to be the same ID each time.
For example, if a user opens five tabs, let's assume that they are given the IDs 104 to 109. Then the user removes the 106 tab and creates a new tab that's given the ID 110. Now they drag tab 108 into the second position. That now gives us 104, 108, 105, 107, 109, 110 in that order. That's assuming that the tabs are given consecutive IDs.
You could access and modify the tabs using the tabs Javascript API in an extension, but it would not be as simple as simply selecting the second tab on the browser list.
Wesley Branton said
To the best of my knowledge, this isn't possible. It's partly because each tab that Firefox creates is given an ID that doesn't necessarily match up to the 1, 2, 3 concept that you mentioned and it's not necessarily going to be the same ID each time.
Well, in my example I used tab1, tab2, etc. just as a way to say "one tab, another tab, etc". What I was suggesting was to identify a tab according to the web page's HTML title loaded within that tab. This is because the HTML title string is always loaded within the tab as shown even through tools such as AutoIT's Windows Info. Of course, the same HTML title string can be loaded in more than one tab, but the "open-in-tab" virtual option could very well be fine-tuned with "first match" or "order by tab creation time" or whatever.
Anyway, I haven't found anything in the current Firefox options so I guess you're right to say that it isn't possible at this time.
Thanks