Skip to content

Instantly share code, notes, and snippets.

View niallkennedy's full-sized avatar

Niall Kennedy niallkennedy

View GitHub Profile
@niallkennedy
niallkennedy / visibility.js
Created June 19, 2011 18:18
Page Visibility API visibility test using jQuery
var isVisible = false;
function onVisible() {
isVisible = true;
jQuery.getScript("http://www.google-analytics.com/ga.js");
}
if ( document.webkitVisibilityState === undefined || document.webkitVisibilityState === "visible" ) {
onVisible();
} else {
jQuery.bind( "webkitvisibilitychange", function() {
@niallkennedy
niallkennedy / keybase.md
Created February 25, 2017 02:43
Keybase claim

Keybase proof

I hereby claim:

  • I am niallkennedy on github.
  • I am niallk (https://keybase.io/niallk) on keybase.
  • I have a public key ASBtnrxnPqcdyAy3NwpS6467eoKA2oRvJGyXPMpSTIeKTgo

To claim this, I am signing this object: