Created
March 3, 2012 20:41
-
-
Save shawnmclean/1968087 to your computer and use it in GitHub Desktop.
Initializing an Activity.js module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var awayCallback = function(){ | |
console.log(new Date().toTimeString() + ": away"); | |
}; | |
var awayBackCallback = function(){ | |
console.log(new Date().toTimeString() + ": back"); | |
}; | |
var activity = new Activity({ | |
onAway: awayCallback, | |
onAwayBack: awayBackCallback, | |
awayTimeout: 5000 //away with 5 seconds of inactivity | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment