How to prevent a Firefox window to accept new tabs from outside?
I use Firefox on Linux, on a wide screen, usually with multiple windows open at the same time.
Specifically, I have a smallish window containing a calendar view. It's annoying that new tabs get created in that small window, because I have to move them manually to another window and resize that. I'd like to be spared the clicks and drags to get that done, or always needing to remember to move the focus to another Firefox window after doing something with the calendar.
Is there a way to accomplish the following: 1. When I've got a Firefox window open that I don't want new tabs in 2. And I open a link from outside Firefox (say, from a mail in Thunderbird or from my IDE) 3. A new tab doesn't get created in the window from 1. 4. Even if that window has the focus. 5. Instead, the URL gets opened in either a new tab in another Firefox window or a new Firefox window
I'm fine with a stable add-on, if that's what it takes to do this.
Any ideas greatly appreciated!
모든 댓글 (6)
Yes, of course it is possible to open links in a new window instead of a tab, for this go to Settings, go to "General" and turn off the function "Open links in tabs instead of new windows" and now links will open in a new window. It is also possible to have new tabs automatically open as a new window, for this just go to Settings, then Home, then scroll down to New windows and tabs and press New tabs and select "Blank page" instead of "Firefox home page".
Thank you, SupportGB! Unfortunately, this doesn't do exactly what I'd like to achieve: when the small window has the focus, and I open a link from Thunderbird, now a new window gets opened alright. Its size, however, is that of the small window. (The size is what I don't want.) So, turning of "open links in tabs instead of new windows" is a step in the right direction, but gets me only halfway to where I'd like to be. (Still got the resizing to do.) In essence, what I'd like to do (the way I imagine it), is to somehow lock a window against receiving new tabs from outside. Like this: I have two Firefox windows, say A and B, A is "locked". When a link is sent to Firefox to be opened from somewhere else, a new tab is opened in B, REGARDLESS of whether A or B had the focus at that time. Note that, instead of a new tab in B, a new window with the size of B would also be fine by me. Essentially, I'd like to have a view on some data that doesn't get disturbed when I work with other tools. Any other ideas?
You can look at browser.link.open_newwindow prefs on the about:config page.
You can override how external links are opened via the browser.link.open_newwindow.override.external pref. If this pref has the default value -1 then browser.link.open_newwindow is used. The meaning of the value of browser.link.open_newwindow.override.external is the same as of browser.link.open_newwindow
- browser.link.open_newwindow = 3 [1:current tab; 2:new window; 3:new tab]
elgeschickto schrieb
Thank you, SupportGB! Unfortunately, this doesn't do exactly what I'd like to achieve: when the small window has the focus, and I open a link from Thunderbird, now a new window gets opened alright. Its size, however, is that of the small window. (The size is what I don't want.) So, turning of "open links in tabs instead of new windows" is a step in the right direction, but gets me only halfway to where I'd like to be. (Still got the resizing to do.) In essence, what I'd like to do (the way I imagine it), is to somehow lock a window against receiving new tabs from outside. Like this: I have two Firefox windows, say A and B, A is "locked". When a link is sent to Firefox to be opened from somewhere else, a new tab is opened in B, REGARDLESS of whether A or B had the focus at that time. Note that, instead of a new tab in B, a new window with the size of B would also be fine by me. Essentially, I'd like to have a view on some data that doesn't get disturbed when I work with other tools. Any other ideas?
SupportGB is largely based on answers and comments from the Internet, so unfortunately SupportGB's answers are not personalized. We are sorry that we could not help you, please describe your problem in detail and we will answer you individually.
글쓴이 SupportGB 수정일시
One option would be to use a pop-up window that is restricted to a single tab. Then even if it is the active window, the new tab will open in a different window. Firefox will make a restricted popup if you specify "features" of the windows in the window.open() script command. Conveniently, width and height are features and you probably want to set those anyway. So let's give it a try:
Let's say you already have a bookmark to the calendar page you want in the new window. Here's how to edit the bookmark's address to have Firefox launch the page in a fixed-size popup. (Of course, tweak the width and height as desired.)
(1) Right-click the bookmark > Edit Bookmark
(2) Revise the URL as follows (keeping your URL in place of this example URL):
javascript:void(window.open('https://www.example.com/', '_blank', 'width=650,height=550'));
(What does this script do: https://developer.mozilla.org/docs/Web/API/Window/open )
(3) Click Save, then click the bookmark to test it out
You'll notice that this little popup does not have a full set of toolbars, so hopefully you don't need them.
P.S. A bookmark address that starts with "javascript:" is called a bookmarklet and it can run a script against the displayed page. Please be cautious in trying bookmarklets from strangers if you can't figure out what they do.
elgeschickto said
I use Firefox on Linux, on a wide screen, usually with multiple windows open at the same time. Specifically, I have a smallish window containing a calendar view. It's annoying that new tabs get created in that small window, because I have to move them manually to another window and resize that. I'd like to be spared the clicks and drags to get that done, or always needing to remember to move the focus to another Firefox window after doing something with the calendar. Is there a way to accomplish the following: 1. When I've got a Firefox window open that I don't want new tabs in 2. And I open a link from outside Firefox (say, from a mail in Thunderbird or from my IDE) 3. A new tab doesn't get created in the window from 1. 4. Even if that window has the focus. 5. Instead, the URL gets opened in either a new tab in another Firefox window or a new Firefox window I'm fine with a stable add-on, if that's what it takes to do this. Any ideas greatly appreciated!
This may sound silly, but have you checked to see if "Open tabs in foreground" is turned on in your settings. If you turn this off, that's exactly what no longer happens.