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.

  • 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 Jun 15 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. :) – music2myear Jun 15 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 Jun 18 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. – music2myear Jun 18 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 Jun 18 at 19:33
up vote 7 down vote accepted

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.

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

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.