title: Firefox "window.open is not a function"
link: http://jj.isgeek.net/2014/09/firefox-window-open-is-not-a-function/
author: Jj
description: 
post_id: 929
date: 2014/09/06 00:41:04
created_gmt: 2014/09/06 05:41:04
comment_status: open
slug: firefox-window-open-is-not-a-function

A quick one, so there is more information about this online. I found the solution on the [Noscript forums](https://forums.informaction.com/viewtopic.php?f=7&t=8453). 

The problem I was having is that with [Noscript](https://addons.mozilla.org/en-US/firefox/addon/noscript/) extension, after enabling the required JS files for a site, it would fail to open popup windows. This made them unusable because even after enabling all scripts, the pop ups would now show up. The only hint was the message on the console "window.open is not a function". Something had declared an `open` function on the top scope with `undefined`. 

I finally found the solution on the link above, the problem was that I've had the extension installed for a number of years already and dragging ancient configurations with it. The problem was the surrogate replacement for `surrogate.popunder.replacement` that had problematic code. 

What I did was to export my current Noscript configuration and reset the script's configuraton. Exported this pristine configuration and copied over the offending setting. Imported my patched configuration and the problem was solved.