English 中文(简体)
how does gmail detect mouse movement?
原标题:
  • 时间:2009-12-03 23:21:26
  •  标签:
  • gmail

if you are inactive on gmail, by not moving your mouse for a while, it changes your chat status to orange which means idle. but when you start moving the mouse again it turns it back to green meaning active. how does it know when you are moving your mouse?

最佳回答

You can attach an "onmousemove" event to the Javascript "document" object, which is triggered every time the mouse moves across the browser window. It s a simple task to reset a timer whenever this happens, and if the timer goes off without any movement detected, it will set your status to "idle". When the onmousemove function is next called, it will set your status back to "available".

Example with full code: http://www.codeguru.com/forum/archive/index.php/t-433956.html

问题回答

without checking, I d say this is done with an onmousemove event handler attached to the whole document.





相关问题
how does gmail detect mouse movement?

if you are inactive on gmail, by not moving your mouse for a while, it changes your chat status to orange which means idle. but when you start moving the mouse again it turns it back to green meaning ...

reading mails using python

how do i read mails from my mail box using python?? import getpass, imaplib M = imaplib.IMAP4( IMAP4.gmail.com:993 ) M.login(getpass.getuser(), getpass.getpass()) M.select() typ, data = M.search(None,...

SMTP Service not available

I am trying to create a web application which upon entering your email address and message , sends an email with this information from the email address. I used this: try { ...

How to auto log into gmail atom feed with Python?

Gmail has this sweet thing going on to get an atom feed: def gmail_url(user, pwd): return "https://"+str(user)+":"+str(pwd)+"@gmail.google.com/gmail/feed/atom" Now when you do this in a browser, ...

Can I build an addin for Gmail?

Is there a way I can create an addin for my Gmail account? Is GreaseMonkey the only real way? I use Gmail for customer service, and I d like to create a tool that looks up the customer and preps a ...

Web Link in a mail is not rendering as link in yahoo

string from = "abc@gmail.com"; string to = "xyz@gmail.com,xyz@yahoo.co.in"; string password="abcxyz"; MailMessage mail = new System.Net.Mail.MailMessage(); mail.To.Add(to); mail.From = new ...

热门标签