-
Notifications
You must be signed in to change notification settings - Fork 22
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
Added desktop notifications to Chrome extension #7
Conversation
Looks great! I'm curious whether the notification shows up if you're already on the page, or does Chrome hide/prevent the notification if you're already on page. Another thing I'm curious about is that it "brings focus to the marmoset tab if still open". Other than those, it's looking pretty nice. I'll pull it in a bit and give it a test run! |
Glad you like it! The case is if marmoset shows the notification, and the user closes marmoset while the notification is still being displayed. Relatively extreme edge case, to be honest, though. |
I think it would be useful to prevent the notification if you're already looking at the page. Another thing I was curious is whether Chrome lets you disable notifications somehow. If such is not the case, some might find it annoying for notifications to popup while they're working on other things, and we might want a settings page for disabling it. |
Ok, the notification will no longer show if you have the page open. And chrome does have a setting to disable notifications: I made sure the app works correctly if they are disabled. (I did create an options page before finding this, though. In case that's ever useful, I have it saved as a branch on my fork: https://github.com/cdrini/MarmoUI/tree/optionsPage ) |
P.S. setTimeout(function() {window.postMessage({type:"resultsNotification", notification:{}},"*")}, 1000) It will just make a junk notification, though. Be sure to leave the marmoset tab/window before the timeout ends! |
Added desktop notifications to Chrome extension
Added desktop notifications to the chrome extension when results are received (see #3 ). Here are some samples:
Notification from ProblemsList:
Clicking "View results" opens a new tab to the submission ("submission.jsp?submissionPK=...")
Clicking the notification brings focus to the marmoset tab if still open, else opens a new one.
Notification from SubmissionsList:
Clicking the notification brings focus to the marmoset tab if still open, else opens a new one.