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

dismiss the news panel on one tab should close it everywhere #1404

Open
staabm opened this issue Nov 3, 2021 · 2 comments
Open

dismiss the news panel on one tab should close it everywhere #1404

staabm opened this issue Nov 3, 2021 · 2 comments
Labels

Comments

@staabm
Copy link

staabm commented Nov 3, 2021

Expected Behavior

I have a lot of github tabs open any time. when octolinker gets a new update which displays a news message, this message is visible on all the tabs. I have to dismiss it at least 10 times

What actually happened?

dismiss the news on any tab, should make it disappear on all openend tabs

URL

No response

Anything else we should know?

I guess this should be possible with the post-message api

@staabm staabm added the bug label Nov 3, 2021
@xt0rted
Copy link
Member

xt0rted commented Nov 5, 2021

@stefanbuck GitHub used to do something where if you weren't logged in and had multiple tabs open when you logged in the others would give you a banner saying you logged in and a button to reload the page. I'm pretty sure they used local storage and listened for a value to be set to show that banner. Not sure if this is applicable here, but it might be one way to achieve this.

@stefanbuck
Copy link
Member

There is another option which is what I have used in Jumpcat to address a similar problem. The web-ext API allows us to send message to all tabs and such a message could dismiss the update dialog in all other tabs.

function broadcastMessageToAllTabs(eventType) {
  chrome.tabs.query({}, (tabs) => {
    tabs.forEach(tab => {
        chrome.tabs.sendMessage(tab.id, 'some-message');
    })
  });
}

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

No branches or pull requests

3 participants