Skip to content
New issue

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

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

Already on GitHub? # to your account

Check status on every tab switch #84

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

Check status on every tab switch #84

wants to merge 1 commit into from

Conversation

rudiedirkx
Copy link

I don't understand the early return in chrome.tabs.onUpdated, because I always want to know the status. When you're loading a tab, you don't know it Xdebug is on. That's strange.

This PR doesn't fix that, because you probably have your reasons, but it does add a chrome.tabs.onActivated to status check for every tab switch. Currently, you can only see the actual status inside the popup, because the icon doesn't update after a tab switch.

I think the whole thing can be much simpler with webRequest, but this is a start.

@rudiedirkx rudiedirkx changed the title Check status on every tab change Check status on every tab switch Sep 1, 2017
@rudiedirkx
Copy link
Author

@mac-cain13
Copy link
Owner

Once up on a time the icons of extensions could be in the addressbar, at that time the state was stored with the tab. So we didn't have to do anything to get the behaviour you describe.

The early return was to prevent issues with;

  • Pages that are not on http, like the welcome page, but this might not be necessary anymore because of the removal from the addressbar
  • Updating the state before the cookies where available (before the complete state)

Now that we're pushed out of the addressbar this issue did indeed arise, I think the onActivated is a nice solution for this.

@rudiedirkx
Copy link
Author

Maybe add chrome.windows.onFocusChanged too, for same origins in separate windows. I did it like this but yours will be different.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants