11

Some websites like to use JavaScript links that open a new window, which lacks any UI except for the address bar. Meaning no extension buttons, search bar, home/back/etc. buttons, bookmarks, tab bar and so on. Opening the link in a new tab/window does not work because the JS fails to work properly.

I encountered this behavior on a private site so I can't link to an example, but if you know one please let me know and I will add it here.

Is there a way to prevent this from happening, and force every window created by JS to have the full interface of a normal Firefox window? Is there a way to get controls back? I believe Chrome for instance has a menu command for it, but I'm not sure about FF.

NB: I am actually on Waterfox but let's answer for Firefox and hopefully it will apply to the forks as well.

7
  • I formerly used Waterfox also, but switched when Mozilla finally released their own 64-bit version of Firefox. Is there a compelling reason why you haven't switched, too?
    – Run5k
    Commented Jun 15, 2018 at 20:54
  • I've done this in the past but I'm having trouble figuring out what I did. This was quite a few years ago. Also Waterfox > Firefox. That's why. :) Commented Jun 15, 2018 at 21:05
  • "Also Waterfox > Firefox. That's why. :)" @music2myear I always appreciate your feedback, but as you might imagine I was hoping to get a more in-depth explanation than what I might typically hear on Xbox Live. ;-)
    – Run5k
    Commented Jun 18, 2018 at 12:17
  • 1
    Waterfox began as a 64bit native version of Firefox with some of the increasing number of "user friendly" restrictions removed and a lot of the privacy settings enhanced. When Firefox went through its major change earlier this year Waterfox forked entirely and is basically a privacy-enhanced variant of the old Firefox architecture. It still supports the old plugins and is taking increasing steps towards recreating the plugin ecosystems being removed by Mozilla. Commented Jun 18, 2018 at 18:28
  • That certainly makes sense. Typically, I use a minimal number of extensions and each one of them was migrated to the new format after Firefox 57 (a.k.a. Quantum) was released.
    – Run5k
    Commented Jun 18, 2018 at 19:33

2 Answers 2

7

Found it: http://kb.mozillazine.org/Prevent_websites_from_disabling_new_window_features

In about:config find dom.disable_window_open_feature.*

There are quite a few entries here that correspond to the various features that can be disabled/manipulated. Here's the list:

  • close: Prevents the close button from being disabled.
  • directories: Prevents the bookmarks toolbar from being hidden.
  • location: Prevents the address bar from being hidden
  • menubar: Prevents the menubar from being hidden.
  • minimizable: Prevents popup window minimization from being disabled.
  • personalbar: Prevents the bookmarks toolbar from being hidden.
  • resizable: Prevents popup window resizing from being disabled.
  • scrollbars: Prevents the scrollbars on a popup from being disabled.
  • status: Prevents the status bar from being hidden.
  • titlebar: Prevents the title bar from being hidden.
  • toolbar: Prevents the navigation toolbar from being hidden.

Setting these to true overrides the developers preferences.

6

Mozilla's online documenation for the Window.open() web API describes how to make changes within the about:config Firefox management interface that will help accomplish what you want:

menubar: Mozilla and Firefox users can force new windows to always render the menubar by setting dom.disable_window_open_feature.menubar to true

toolbar: If this feature is on, then the new secondary window renders the Navigation Toolbar (Back, Forward, Reload, Stop buttons). Mozilla and Firefox users can force new windows to always render the Navigation Toolbar by setting dom.disable_window_open_feature.toolbar to true

personalbar: Mozilla and Firefox users can force new windows to always render the Personal Toolbar/Bookmarks toolbar by setting dom.disable_window_open_feature.personalbar to true

titlebar: Mozilla and Firefox users can force new windows to always render the titlebar by setting dom.disable_window_open_feature.titlebar to true

close: Mozilla and Firefox users can force new windows to always have a close button by setting dom.disable_window_open_feature.close to true

Notably, the following preference settings already default to true and don't need to be changed:

dom.disable_window_open_feature.resizable

dom.disable_window_open_feature.location

Also, starting with Firefox 49 the following feature is on by default so the about:config preference has been removed:

dom.disable_window_open_feature.scrollbars


Source: https://developer.mozilla.org/en-US/docs/Web/API/Window/open

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .