Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for @grant window.close (Tampermonkey parity) #2538

Closed
lainverse opened this issue Aug 5, 2017 · 3 comments
Closed

Add support for @grant window.close (Tampermonkey parity) #2538

lainverse opened this issue Aug 5, 2017 · 3 comments
Labels
bankruptcy Issues that have been closed for "bug bankruptcy". Usually very old non-active issues.
Milestone

Comments

@lainverse
Copy link

Hi,

I'm developing adblocking script for cases not handled by Adblock Plus filters list https://greasyfork.org/en/scripts/19993-ru-adlist-js-fixes and encountered a situation when it have to close a tab when it attempts to unload content to prevent background redirect in it (look for preventPopunders and preventPopMix functions). Some ad scripts open current page in a new tab and then load ads in the previous one to avoid popup blocking in ABP.

However, it looks like no matter where I call for window.close() it simply doesn't work in Firefox since window in which redirect happens wasn't opened by a script in the first place. In Tampermonkey I solved this with @grant window.close, but it doesn't work in Greasemonkey for Firefox.

@janekptacijarabaci
Copy link
Contributor

See also about:config:
dom.allow_scripts_to_close_windows

@lainverse
Copy link
Author

Thanks, I know about this, but I can't recommend this to users. It's disabled for a reason.

@arantius arantius added this to the Pony milestone Oct 25, 2017
@dtrunk90
Copy link

dtrunk90 commented Aug 1, 2019

Any progress here?

@arantius arantius added the bankruptcy Issues that have been closed for "bug bankruptcy". Usually very old non-active issues. label Nov 2, 2023
@arantius arantius closed this as completed Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bankruptcy Issues that have been closed for "bug bankruptcy". Usually very old non-active issues.
Projects
None yet
Development

No branches or pull requests

4 participants