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

Improve window-close scriptlet — use browser extension's API #170

Closed
ameshkov opened this issue Dec 14, 2021 · 0 comments
Closed

Improve window-close scriptlet — use browser extension's API #170

ameshkov opened this issue Dec 14, 2021 · 0 comments

Comments

@ameshkov
Copy link
Member

ameshkov commented Dec 14, 2021

It was implemented in #158

However, there're some issues with it in Chrome. The problem is that Chrome limits which scripts can call window.close. The only way to fix this is to do that via the browser extension's API (using tabs API).

I suggest in addition to trying to call window.close sending a custom event that will be then handled by the content script and passed to the background page. The background page handles this message and closes the window via tabs API.

@ameshkov ameshkov added the enhancement Improvement of existent feature label Dec 14, 2021
@slavaleleka slavaleleka self-assigned this Dec 14, 2021
@ameshkov ameshkov changed the title Improved window.close scriptlet Improve the window-close scriptlet Dec 14, 2021
@slavaleleka slavaleleka changed the title Improve the window-close scriptlet Improve window-close scriptlet — use browser extension's API Apr 11, 2022
adguard pushed a commit that referenced this issue Jun 1, 2022
…AG-11810

Merge in ADGUARD-FILTERS/scriptlets from fix/AG-11810 to master

Squashed commit of the following:

commit f5457e9
Author: Stanislav A <[email protected]>
Date:   Mon May 30 18:17:11 2022 +0300

    improve close-window scriptlet for chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants