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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KhaimovMR
Copy link

No description provided.

@KhaimovMR KhaimovMR 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. :)

@KhaimovMR KhaimovMR force-pushed the khaimovmr/close-tab-on-external branch 2 times, most recently from 959ae05 to 9527915 Compare May 8, 2019 17:37
@KhaimovMR KhaimovMR force-pushed the khaimovmr/close-tab-on-external branch from 9527915 to afdea12 Compare May 8, 2019 18:00
@@ -98,6 +99,10 @@ function checkRedirects(details) {
}
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