google ads script

  • Upload
    vinrav

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

  • 8/9/2019 google ads script

    1/5

    (function(){var l=this,aa=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},ba=function(a,b,c){return a.call.apply(a.bind,arguments)},ca=function(a,b,c){if(!a)throw Error();if(2Math.random())){var c=Math.random();if(c

  • 8/9/2019 google ads script

    2/5

    slotname:"google_ad_slot",output:"google_ad_output",ad_type:"google_ad_type",async_oa:"google_async_for_oa_experiment",dimpr:"google_always_use_delayed_impressions_experiment",peri:"google_top_experiment",pse:"google_pstate_expt"};var Ha=!!window.google_async_iframe_id,Ia=/MSIE [2-7]|PlayStation|Gecko\/20090226|Android 2\.|Opera/i,Ja=/Android/;var O=null,Ka=function(){if(!O){for(var a=window,b=a,c=0;a&&a!=a.parent;)if(a=a.parent,c++,A(a))b=a;else break;O=b}return O};var P=function(a,b,c){c||(c=ma?"https":"http");return[c,"://",a,b].join("")};var La=function(){},Q=function(a,b,c){switch(typeof b){case "string":Ma(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(b instanceof Array){var e=b.length;c.push("[");for(var d="",f=0;fb?d+="000":256>b?d+="00":4096>b&&(d+="0");return R[a]=d+b.toString(16)}));b.push('"')};var S="google_ad_block google_ad_channel google_ad_client google_ad_ format google_ad_height google_ad_host google_ad_host_channel google_ad_host_tier_id google_ad_modifications google_ad_output google_ad_region google_ad_section google_ad_slot google_ad_type google_ad_unit_key google_ad_unit_key_2 google_ad

    _width google_adtest google_allow_expandable_ads google_alternate_ad_url google_ alternate_color google_analytics_domain_name google_analytics_uacct google_analytics_url_parameters google_available_width google_bid google_captcha_token google_city google_color_bg google_color_border google_color_line google_color_link google_color_text google_color_url google_container_id google_content_recommendation_ui_type google_contents google_country google_cpm google_ctr_threshold google_cust_age google_cust_ch google_cust_criteria google_cust_gender google_cust_id google_cust_interests google_cust_job google_cust_l google_cust_lh google_cust_ u_url google_disable_video_autoplay google_ed google_eids google_enable_content_ recommendations google_enable_ose google_enable_ose_periscope google_encoding google_floating_ad_position google_font_face google_font_size google_frame_id google_gl google_hints google_image_size google_kw google_kw_type google_lact google

    _language google_loeid google_max_num_ads google_max_radlink_len google_mtl google_num_radlinks google_num_radlinks_per_unit google_only_ads_with_video google_only_pyv_ads google_only_userchoice_ads google_original_width google_override_format google_page_url google_pgb_reactive google_previous_watch google_previous_searches google_referrer_url google_region google_responsive_formats google_reuse_ colors google_rl_dest_url google_rl_filtering google_rl_mode google_rt google_safe google_sc_id google_scs google_source_type google_sui google_skip google_tag_ for_child_directed_treatment google_tag_info google_tag_origin google_targetinggoogle_tdsma google_tfs google_tl google_ui_features google_ui_version google_video_doc_id google_video_product_type google_video_url_to_fetch google_with_pyv_ads google_yt_pt google_yt_up".split(" "),Oa={google_ad_modifications:!0,google_analytics_domain_name:!0,google_analytics_ uacct:!0},Pa=function(a){a.google_page_url&&(a.google_page_url=String(a.google_page_url));var b=[];K(a,function(a,e){if(null!=a){var d;try{var f=[];Q(new La,a,f);d=f.join("")}catch(g){}d&&(d=d.replace(/\\|\//,"\\$&"),va(b,e,"=",d,";"))}});return b.join("")};var T=null;var U=function(a){this.j=a;a.google_iframe_oncopy||(a.google_iframe_oncopy={handlers:{},upd:m(this.B,this)});this.v=a.google_iframe

    _oncopy},Qa;var V="var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}";/[\x00&"']/.test(V)&&(-1!=V.indexOf("&")&&(V=V.replace(pa,"&")),-1!=V.indexOf("")&&(V=V.replace(ra,">")),-1!=V.indexOf('"')&&(V=V.replace(sa,""")),-1!=V.indexOf("'")&&(V=V.replace(

  • 8/9/2019 google ads script

    3/5

    ta,"'")),-1!=V.indexOf("\x00")&&(V=V.replace(ua,"")));Qa=V;U.prototype.set=function(a,b){this.v.handlers[a]=b;this.j.addEventListener&&this.j.addEventListener("load",m(this.r,this,a),!1)};U.prototype.r=function(a){a=this.j.document.getElementById(a);try{var b=a.contentWindow.document;if(a.onload&&b&&(!b.body||!b.body.firstChild))a.onload()}catch(c){}};U.prototype.B=function(a,b){var c=Ra("rx",a),e;o:{if(a&&(e=a.match("dt=([^&]+)"))&&2==e.length){e=e[1];break o}e=""}e=(new Date).getTime()-e;c=c.replace(/&dtd=(\d+|M)/,"&dtd="+(1E4>e?e+"":"M"));this.set(b,c);return c};var Ra=function(a,b){var c=new RegExp("\\b"+a+"=(\\d+)"),e=c.exec(b);e&&(b=b.replace(c,a+"="+(+e[1]+1||1)));return b};var W;o:{var Sa=l.navigator;if(Sa){var Ta=Sa.userAgent;if(Ta){W=Ta;break o}}W=""};var Ua=-1!=W.indexOf("Opera")||-1!=W.indexOf("OPR"),Va=-1!=W.indexOf("Trident")||-1!=W.indexOf("MSIE"),Wa=-1!=W.indexOf("Gecko")&&-1==W.toLowerCase().indexOf("webkit")&&!(-1!=W.indexOf("Trident")||-1!=W.indexOf("MSIE")),Xa=-1!=W.toLowerCase().indexOf("webkit");(function(){var a="",b;if(Ua&&l.opera)return a=l.opera.version,"function"==aa(a)?a():a;Wa?b=/rv\:([^\);]+)(\)|;)/:Va?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:Xa&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(W))?a[1]:"");return Va&&(b=(b=l.document)?b.documentMode:void 0,b>parseFloat(a))?String(b):a})();var Ya=function(a){if(!a)return"";(a=a.toLowerCase())&&"ca-"!=a.substring(0,3)&&(a="ca-"+a);return a};var Za=

    {"120x90":!0,"160x90":!0,"180x90":!0,"200x90":!0,"468x15":!0,"728x15":!0};var X,Y=function(a){this.l=[];this.j=a||window;this.i=0;this.k=null;this.p=0},$a=function(a,b){this.s=a;this.C=b};Y.prototype.q=function(a,b){0!=this.i||0!=this.l.length||b&&b!=window?this.m(a,b):(this.i=2,this.o(new $a(a,window)))};Y.prototype.m=function(a,b){this.l.push(new $a(a,b||this.j));Z(this)};Y.prototype.t=function(a){this.i=1;if(a){var b=N("sjr::timeout",m(this.n,this,!0));this.k=this.j.setTimeout(b,a)}};Y.prototype.n=function(a){a&&++this.p;1==this.i&&(null!=this.k&&(this.j.clearTimeout(this.k),this.k=null),this.i=0);Z(this)};Y.prototype.u=function(){return!(!window||!Array)};Y.prototype.w=function(){return this.p};Y.prototype.nq=Y.prototype.q;Y.prototype.nqa=Y.prototype.m;Y.prototype.al=Y.prototype.t;Y.prototype.rl=Y.prototype.n;Y.prototype.sz=Y.prototype.u;Y.prototype.tc=Y.prototype.w;var Z=function(a){var b=N("sjr::tryrun",m(a.A,a));a.j.setTimeout(b,0)};Y.prototype.A=function(){if(0==this.i&&this.l.length){var a=this.l.shift();this.i=2;var b=N("sjr::run",m(this.o,this,a));a.C.setTimeout(b,0);Z(this)}};Y.prototype.o=function(a){this.i=0;a.s()};var ab=function(a){try{return a.sz()}catch(b){return!1}},bb=function(a){return!!a&&("object"==typeof a||"function"==typeof a)&&ab(a)&&L(a.nq)&&L(a.nqa)&&L(a.al)&&L(a.rl)},cb=function(){if(X&&ab(X))return X;var a=Ka(),b=a.google_jobrunner;return bb(b)?X=b:a.google_jobrunner=X=new Y(a)},db=function(a,b){cb().nq(a,b)},eb=function(a,b){cb().nqa(a,b)};var fb=Ha?1==ya():!ya(),gb=function(){var a=z("script"),b;b=ea("","pagead2.googlesyndication.com");return[""].join("")},hb=function(a,b,c,e){return function(){var d=!1;e&&cb().al(3E4);var f=a.document.getElementById(b);f&&!A(f.contentWindow)&&3==a.google_top_js_status&&(a.google_top_js_status=6);try{if(A(a.document.getElementById(b).contentWindow)){var g=a.document.getElementById(b).contentWindow,h=g.document;h.body&&h.body.firstChild||(h.open(),g.google_async_iframe_close=!0,h.write(c))}else{var k=a.document.getElementById(b).contentWindow,p;f=c;f=String(f);if(f.quote)p=f.quote();else{g=['"'];for(h=0;hy){if(t="\\x",16>y||256y&&(t+="0");t+=y.toString(16).toUpperCase()}E=J[v]=t}}C=E}g[x]=C}g.push('"');p=g.join("")}k.location.replace("javascript:"+p)}d=!0}catch(ob){k=Ka().google_jobrunner,bb(k)&&k.rl()}d&&(d=Ra("google_async_rrc",c),(new U(a)).set(b,hb(a,b,d,!1)))}},ib=function(a){var b=["");return b.join("")},jb=function(a){var b;if(b=fb){if(!T)o:{var c=[F.top];b=[];for(var e=0,d;d=c[e++];){b.push(d);try{if(d.frames)for(var f=d.frames.length,g=0;gc.length;++g)c

  • 8/9/2019 google ads script

    4/5

    .push(d.frames[g])}catch(h){}}for(f=0;fe;f=f.parentNode,++e)c.push(9!=f.nodeType&&f.id||"");(c=c.join())&&d.push(c);b.google_ad_unit_key=za(d.join(":")).toString();d=a.google_adk2_experiment=a.google_adk2_experiment||B(["C","E"],ia)||"N";if("E"==d){d=G;c=[];for(e=0;d&&25>e;++e){var f=(f=9!=d.nodeType&&d.id)?"/"+f:"",g;o:{if(d&&d.nodeName&&d.parentElement){g=d.nodeName.toLowerCase();for(var h=d.parentElement.childNodes,k=0,p=0;pe;++e){for(var x=q.frames,f=0;f

  • 8/9/2019 google ads script

    5/5

    "");g=c.id;k="border:none;height:"+p+"px;margin:0;padding:0;position:relative;visibility:visible;width:"+k+"px;background-color:transparent";f.write(['',h.join(" "),""].join(""));g=c.id;c=kb(d)?B(["c","e"],ja):null;lb(a,d,"e"==c);f=Pa(d);d=jb(d.google_ad

    _client);h=(new Date).getTime();k=a.google_top_experiment;if(p=a.google_async_for_oa_experiment)a.google_async_for_oa_experiment=void 0;var n=a.google_always_use_delayed_impressions_experiment,q=a.google_floating_ads_js_experiment;d=["",d,"",f,"google_show_ads_impl=true;google_unique_id=",a.google_unique_id,';google_async_iframe_id="',g,'";google_start_time=',r,";",k?'google_top_experiment="'+k+'";':"",p?'google_async_for_oa_experiment="'+p+'";':"",n?'google_always_ use_delayed_impressions_experiment="'+n+'";':"",c?'google_append_as_for_format_override="'+c+'";':"",q?'google_floating_ads_js_experiment="'+q+'";':"","google_bpp=",h>r?h-r:1,";google_async_rrc=0;",gb(),""].join("");(a.document.getElementById(g)?db:eb)(hb(a,g,d,!0))}});})();