Skip to content

Close tab after the redirect to the external application.#146

Open
realARCHaim wants to merge 1 commit intoeinaregilsson:masterfrom
realARCHaim:khaimovmr/close-tab-on-external
Open

Close tab after the redirect to the external application.#146
realARCHaim wants to merge 1 commit intoeinaregilsson:masterfrom
realARCHaim:khaimovmr/close-tab-on-external

Conversation

@realARCHaim
Copy link

No description provided.

@realARCHaim realARCHaim force-pushed the khaimovmr/close-tab-on-external branch 4 times, most recently from ead3742 to f9c6866 Compare May 6, 2019 18:15
@einaregilsson
Copy link
Collaborator

Thanks. I'll look at this before I do the next release, not sure when that will be. :)

@realARCHaim realARCHaim force-pushed the khaimovmr/close-tab-on-external branch 2 times, most recently from 959ae05 to 9527915 Compare May 8, 2019 17:37
@realARCHaim realARCHaim force-pushed the khaimovmr/close-tab-on-external branch from 9527915 to afdea12 Compare May 8, 2019 18:00
ignoreNextRequest[result.redirectTo] = new Date().getTime();

if (result.redirectTo.match(internalProtocolsRegexp) == null) {
window.setTimeout(function(){chrome.tabs.remove(details.tabId);}, 5000);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timeout is for the case when the external application opens for a first time and awaits for the confirmation from user.
Ofcourse it affects only the external application calls done by redirect from the Redirector rules. Usual external protocols openings (like magnet:, skype:, etc) will not be affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants