joeyespo / inbox-by-gmail-checker

Displays the number of unread messages in Inbox by Gmail. You can also click the button to open your inbox.
http://joeyespo.com/inbox-by-gmail-checker
MIT License
68 stars 11 forks source link

Use New Tab #8

Closed orschiro closed 8 years ago

orschiro commented 8 years ago

Hi @joeyespo,

Just a quick idea:

Could the checker identify an existing open tab and rather open inbox in this tab on click of the checker's icon?

Currently, if there is an open new tab, the checker still does open Inbox in another new tab rather the already opened new tab.

Thankfully,

~Robert

joeyespo commented 8 years ago

Hmm, it should already do this. Is your Inbox tab on another window? #4 should have fixed that case.

orschiro commented 8 years ago

Hey @joeyespo,

No, it's in the same window.

Let me show you the problem in the following screencast:

vokoscreen-2016-01-16_10-49-20.mkv Uploaded using ZenHub.io

joeyespo commented 8 years ago

Oh, my mistake! I mis-read what you wrote.

Do any other extensions do this? (I know Chrome's built-in commands do re-use the new tab page.) I don't think there's a "correct" answer here, and I personally prefer the existing behavior, so let's look to see what the rest of the extension community does and do that.

orschiro commented 8 years ago

@joeyespo,

Indeed I'm using a 3rd-party extension called Keep One Pinned Tab which is quite useful to always have one New Tab opened.

It would be great if I could make it somehow compatible with the Inbox Checker.

Any ideas?

theborg3of5 commented 8 years ago

Hey, developer of Keep One Pinned Tab here.

@joeyespo, do you know how you check whether there's already a new tab for you to use when the button is clicked? It looks like there's a custom new tab page, so if you're checking for chrome://newtab/ or similar, you might be missing it that way.

joeyespo commented 8 years ago

@orschiro Sorry, what I meant to ask was "do any other 3rd-party extensions re-use an open New Tab" like what you're requesting? I've only seen builtin commands like History, Settings, and Extensions do this, but no extensions I've come across yet.

@theborg3of5 Wow, thanks for chiming in! I appreciate it. Yeah, I was aware of how to do this. This extension opens Inbox in its own tab (regardless of whether an existing "New Tab" is present) by design. This matches the behavior of the Gmail Checker, which was the inspiration for this project.

orschiro commented 8 years ago

@joeyespo

@orschiro Sorry, what I meant to ask was "do any other 3rd-party extensions re-use an open New Tab" like what you're requesting? I've only seen builtin commands like History, Settings, and Extensions do this, but no extensions I've come across yet.

I will try to find extension that does that, i.e. opening a site in the currently opened new tab.

@theborg3of5 indeed thank you so much for trying to help out!

Just to let you both know that the issue is totally unrelated to having both extensions installed. I guess it's just that opening sites in another new tab might be a default Chrome behaviour. What do you think?

~Robert

joeyespo commented 8 years ago

I guess it's just that opening sites in another new tab might be a default Chrome behaviour

I believe it is. Some examples: opening a bookmark from your desktop, clicking on a link from another application, programmatically (import webbrowser; webbrowser.open('http://example.com/') in Python for example), etc.

I will try to find extension that does that, i.e. opening a site in the currently opened new tab.

Sounds good. I'm going to close this for now.

Thanks for sharing your idea!

orschiro commented 8 years ago

Just to let you know, Close Extra New Tab solves our problem! :)

-Robert

joeyespo commented 8 years ago

@orschiro Awesome! Thanks for sharing :smiley:

orschiro commented 8 years ago

@joeyespo you're very welcome! :)