0% found this document useful (0 votes)
9 views1 page

JavaScript Window Focus Tracking

The document contains a JavaScript function that defines various utility functions for handling events and determining the type of objects. It includes functionality for tracking visibility changes of the window and handling click events. The code also sets up a mechanism to send image requests based on certain conditions related to window focus and visibility state.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

JavaScript Window Focus Tracking

The document contains a JavaScript function that defines various utility functions for handling events and determining the type of objects. It includes functionality for tracking visibility changes of the window and handling click events. The code also sets up a mechanism to send image requests based on certain conditions related to window focus and visibility state.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

(function(){function e(a){var b=typeof a;if("object"==b)if(a){if(a instanceof

Array)return"array";if(a instanceof Object)return b;var


c=[Link](a);if("[object
Window]"==c)return"object";if("[object Array]"==c||"number"==typeof
[Link]&&"undefined"!=typeof [Link]&&"undefined"!=typeof
[Link]&&![Link]("splice"))return"array";if("[object
Function]"==c||"undefined"!=typeof [Link]&&"undefined"!=typeof
[Link]&&![Link]("call"))return"function"}else
return"null";else if("function"==b&&"undefined"==typeof
[Link])return"object";return b}var f=[Link]||function(){return+new Date};var
g=document,h=window;function k(a,b,c){[Link]&&[Link](b,c,!
1)};function l(a,b,c){if("array"==e(b))for(var d=0;d<[Link];d+
+)l(a,String(b[d]),c);else null!=b&&[Link](a+
(""===b?"":"="+encodeURIComponent(String(b))))};function m(a,b,c){n([Link])?
(this.a="hidden",this.f="visibilitychange"):n([Link])?
(this.a="mozHidden",this.f="mozvisibilitychange"):n([Link])?
(this.a="msHidden",this.f="msvisibilitychange"):n([Link])&&(this.a="webkitH
idden",this.f="webkitvisibilitychange");this.h=a;this.b=!1;this.c=-
1;this.i=b;this.j=c;g[this.a]&&p(this,2);q(this);r(this)}function q(a)
{k(g,a.f,function(){if(g[a.a])a.b&&(a.b=!1,a.c=f(),p(a,0));else{if(-1!=a.c){var
b=f()-a.c;0<b&&(a.c=-1,p(a,1,b))}p(a,3)}})}function r(a){k(h,"click",function(b)
{return a.g(b)})}[Link].g=function(){var a=this;this.b=!
0;[Link](function(){a.b=!1},5E3)};function p(a,b,c){var
d={gqid:a.i,qqid:a.j};0==b&&(d["return"]=0);1==b&&(d["return"]=1,[Link]=c);2==
b&&([Link]=1);3==b&&([Link]=1);b=[];for(var w in
d)l(w,d[w],b);a=a.h+"&label=window_focus&"+[Link]("&");h.google_image_requests||
(h.google_image_requests=[]);d=[Link]("img");[Link]=a;h.google_ima
ge_requests.push(d)}[Link]=[Link].g;function n(a)
{return"undefined"!==typeof a};function t(a,b,c){return new m(a,b,c)}var
u=["wfocusnhinit"],v=this;u[0]in v||"undefined"==typeof [Link]||
[Link]("var "+u[0]);for(var x;[Link]&&(x=[Link]());){var y;if(y=!
[Link])y=void 0!==t;y?v[x]=t:v[x]&&v[x]!==[Link][x]?
v=v[x]:v=v[x]={}}var z=h.google_wf_async,A;if(A=!(!z||!
[Link]))A="function"===typeof z;A&&h.google_wf_async();}).call(this);

You might also like