2
Declined

New setting to auto-hide Chrome notifications X seconds after user input detected.

I'd like to see a smarter notification hiding setting, where the notification would display and stay up indefinitely, and then when the user moves their mouse or presses a key, then the auto-hide timer kicks in.

Basically, just start the auto-hide timer after the most recent user input.  That way the message doesn't pop up and disappear if you step away from the computer for a minute.

Thanks!

2 replies

Hi, I know this request is denied, but I would like to ask, are you really sure this doesn't exist? 
I found this: https://developer.chrome.com/extensions/input_ime

and for hiding the popup you can consider making the priority below zero, -1 or -2 when you got the keyevent activated. 
https://developer.chrome.com/apps/notifications#type-NotificationOptions (see priority)

But i'm a noob (although I have some experience in webdevelopment, not with extensions), so maybe this is just a completely wrong reference I looked up. So please forgive me if I said something stupid. 

Unfortunately that's only for Chrome OS sorry!

OK, thanks, very confusing. Even google itself keeps redirecting to irrelevant references. 

Unfortunately that's not possible in Chrome. There's no way to detect user input like that. Sorry!

Also, look up content scripts (for injecting scripts to the current website you are visiting, i.e. for waiting on keyevents) https://developer.chrome.com/extensions/content_scripts

and then use Message Passing to communicate between the content script you injected and your extension ( If I interpret it correctly) in order for your extension to be able to get input from whatever the person is doing or whatever is displaying on that website. But that also needs permissions, and comes with privacy concerns, but this is open source, or isn't it? 
https://developer.chrome.com/extensions/messaging

Again, like my other comment here, I'm no expert and I might be saying something really stupid. 

Or this? 

https://developer.chrome.com/apps/richNotifications#events

while using:
https://developer.chrome.com/apps/events

EDIT: Sorry, I overlooked the fact that rich notifications don't work with extensions.. 

But maybe you can use a timer to replace current visible notifications with unvisible notifications if closing them somehow doesn't work: 
code example:

https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API#Replacing_existing_notifications

 

Isn't this supported with chrome.idle API

https

://developer.chrome.com/extensions/idle