Skip to content

Instantly share code, notes, and snippets.

@nbashaw
Created June 28, 2012 00:10
Show Gist options
  • Save nbashaw/3007768 to your computer and use it in GitHub Desktop.
Save nbashaw/3007768 to your computer and use it in GitHub Desktop.
// Hide Olark before 8am and after 5pm
// (Pacific Time Zone)
var d = new Date();
var utcHour = d.getUTCHours();
var pacificHour = utcHour + 7
if (pacificHour < 8 || pacificHour > 16) {
olark('api.box.hide');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment