Prevent script opened windows from closing them

(Mavinkai) #1

Hi, ever since Firefox Quantum I have a problem with my banking site on Android. The link is (but you cant continue further without a login id and password).

When I enter the user id and password and click login, a javascript popup is opened to access the banking account. On firefox quantum on android the popup window just gets closed after a few redirects. On desktop it loads just fine. On chrome on android the popup tab doesnt get closed and the site loads fine. On firefox prior to quantum the popup wouldnt get closed and the banking site would load fine.

Is there anyway to disable the closing (most likely from the script) of the popup tab? I have tampermonkey installed on firefox quantum on android. Could I get some pointers as to how to trap the javascript.close() function and disable it?

Should I try adding a onbeforeunload listener?

I tried editing the user.js file to implement a CAPS policy, but it looks like CAPS policies are no longer supported…


(Mavinkai) #2

Okay you can enter any random userid and password in the link provided above. It will open the popup window and say invalid userid and password. It also gives a close window button. Clicking the button closes the popup window.

How do I disable the ability of the script to close the window in Firefox Quantum?

(Mavinkai) #3

It works now with tampermonkey

unsafeWindow.window.wrappedJSObject.close = function(){};