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

Add options to customize what happens when clicking on notifications #400

Closed
gizellos opened this issue Jan 14, 2018 · 10 comments
Closed

Add options to customize what happens when clicking on notifications #400

gizellos opened this issue Jan 14, 2018 · 10 comments

Comments

@gizellos
Copy link

gizellos commented Jan 14, 2018

You wrote...

The only issue I found with this is that it would be better if there was a way to detect if the page is already open and simply refresh it, but I don't know, what do you think?

I think it is a good idea. I thought about it and there could be quite a lot of combinations. I am not sure if they are all meaningful. Let's thought about it.

  1. Always open the pages in a new tab (as it is now)
  2. Detect if the same page is opened in the active tab and if it, refresh it
  3. Detect if any page from SG is opened in the active tab and if it, refresh open it
  4. Detect if the same page is opened anywhere and if it, set the tab as active and open it
  5. Detect if any page from SG is opened anywhere and if it, set the tab as active and open it
@rafaelgomesxyz
Copy link
Owner

I think all are good, but 3 shouldn't be refreshed, because if the page open on SG is not the page for the notification, it makes no sense refreshing it.

@gizellos
Copy link
Author

You are right. I will edit it.

@rafaelgomesxyz rafaelgomesxyz changed the title New options for opened pages through chrome notifications Add options to customize what happens when clicking on notifications Jan 14, 2018
@rafaelgomesxyz rafaelgomesxyz added this to the 7.13.1 milestone Jan 14, 2018
rafaelgomesxyz pushed a commit that referenced this issue Jan 14, 2018
@rafaelgomesxyz
Copy link
Owner

Added, I think I covered all 5 options. This will be only available in the extension as it is not possible to manipulate tabs with the userscript.

@gizellos
Copy link
Author

It looks good. So since now the extensions is not only faster but it has also more functions.

@rafaelgomesxyz
Copy link
Owner

Yes, this was why I switched to extension, it gives me a lot more freedom to do cool stuff.

@gizellos
Copy link
Author

I have everything enabled and after clicking on wishlist notification, it didn't open the wishlist page instead of an open SG page. It is the option 3 I suggested. Did you forget to add the settings or I have to set it differently?

@rafaelgomesxyz
Copy link
Owner

You mean you want it to open any SG page when the page is not open? Do you have "If the page is not open, set any SG/ST tab as active." enabled?

@gizellos
Copy link
Author

gizellos commented Jan 15, 2018

I want this: if the wishlist page is opened, refresh it, if any other SG page is opened, open the wishlist page instead of it, if no SG page is opened, open the wishlist page in a new tab.

I clicked on the notification and the wishlist page was not opened. Only an opened SG page was set as active.

2018-01-15_215117

@rafaelgomesxyz
Copy link
Owner

rafaelgomesxyz commented Jan 15, 2018

It is impossible for no SG page to be open, because if you get the notification it has to come from a SG page. Try disabling "If the page is not open, set any SG/ST tab as active.", I think it will do what you want.

@gizellos
Copy link
Author

Hehe, you are right. I didn't realize that.

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

No branches or pull requests

2 participants