Skip to content

Commit

Permalink
Fix various issues with the inabox integration tests (ampproject#20972)
Browse files Browse the repository at this point in the history
* Fix various issues with the inabox integration tests.

* Try referencing window directly

* Load safeframe from the Karma test server.

* Disable the problematic tests to verify the rest works

* Skip safe frame tests on Firefox

* lint

* Properly test inabox-viewport-friendly flag.

Notably this allows Safari to pass the friendly frame case without needing the host script

* lint

* Trivial comment

* Relax the min percentage visible restriction.

On Firefox occasionally the window may not scroll down all the way, barely missing out on the 50% mark.
  • Loading branch information
zombifier authored and bramanudom committed Mar 22, 2019
1 parent ca9fc10 commit 09af523
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 25 deletions.
1 change: 0 additions & 1 deletion build-system/amp4test.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ app.get('/a4a/:bid', (req, res) => {
body,
css: 'body { background-color: #f4f4f4; }',
extensions: ['amp-analytics'],
mode: 'cdn',
});
res.send(doc);
});
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/amp-cupcake-ad.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*# sourceURL=/extensions/amp-social-share/0.1/amp-social-share.css*/</style><style amp-extension="amp-form">form.amp-form-submit-error [submit-error],form.amp-form-submit-success [submit-success],form.amp-form-submitting [submitting]{display:block}.i-amphtml-validation-bubble{-webkit-transform:translate(-50%,-100%);transform:translate(-50%,-100%);background-color:#fff;box-shadow:0 5px 15px 0 rgba(0,0,0,0.5);max-width:200px;position:absolute;display:block;box-sizing:border-box;padding:10px;border-radius:5px}.i-amphtml-validation-bubble:after{content:" ";position:absolute;bottom:-8px;left:30px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #fff}[visible-when-invalid]{color:red}
/*# sourceURL=/extensions/amp-form/0.1/amp-form.css*/</style><style amp-extension="amp-fit-text">.i-amphtml-fit-text-content,.i-amphtml-fit-text-content.i-amphtml-fill-content{display:block;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.i-amphtml-fit-text-content-overflown{display:block;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
/*# sourceURL=/extensions/amp-fit-text/0.1/amp-fit-text.css*/</style><style amp-extension="amp-carousel">.amp-carousel-slide>.i-amphtml-replaced-content{-o-object-fit:contain;object-fit:contain}.amp-carousel-button{position:absolute;box-sizing:border-box;top:50%;height:34px;width:34px;border-radius:2px;opacity:0;pointer-events:all;background-color:rgba(0,0,0,0.5);background-position:50% 50%;background-repeat:no-repeat;-webkit-transform:translateY(-50%);transform:translateY(-50%);visibility:hidden;z-index:10}.amp-mode-mouse .amp-carousel-button,amp-carousel[controls] .amp-carousel-button{opacity:1;visibility:visible}.amp-carousel-button-prev{left:16px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%23fff'%3E%3Cpath d='M15 8.25H5.87l4.19-4.19L9 3 3 9l6 6 1.06-1.06-4.19-4.19H15v-1.5z'/%3E%3C/svg%3E");background-size:18px 18px}.amp-carousel-button-next{right:16px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%23fff'%3E%3Cpath d='M9 3L7.94 4.06l4.19 4.19H3v1.5h9.13l-4.19 4.19L9 15l6-6z'/%3E%3C/svg%3E");background-size:18px 18px}.i-amphtml-carousel-button-start-hint .amp-carousel-button:not(.amp-disabled){-webkit-animation:i-amphtml-carousel-hint 1s ease-in 3s 1 normal both;animation:i-amphtml-carousel-hint 1s ease-in 3s 1 normal both}.amp-mode-mouse .i-amphtml-carousel-button-start-hint .amp-carousel-button:not(.amp-disabled){-webkit-animation:none;animation:none}@-webkit-keyframes i-amphtml-carousel-hint{0%{opacity:1;visibility:visible}to{opacity:0;visibility:hidden}}@keyframes i-amphtml-carousel-hint{0%{opacity:1;visibility:visible}to{opacity:0;visibility:hidden}}amp-carousel .amp-carousel-button.amp-disabled{-webkit-animation:none;animation:none;opacity:0;visibility:hidden}.i-amphtml-slides-container{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-wrap:nowrap;flex-wrap:nowrap;height:100%!important;left:0;overflow-x:auto!important;overflow-y:hidden!important;position:absolute!important;top:0;width:100%!important;-webkit-scroll-snap-type:x mandatory!important;scroll-snap-type:x mandatory!important;padding-bottom:20px!important;box-sizing:content-box!important;-webkit-overflow-scrolling:touch!important}.i-amphtml-slides-container.i-amphtml-no-scroll{overflow-x:hidden!important}.i-amphtml-slide-item{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important;display:none!important;-webkit-box-flex:0!important;-ms-flex:0 0 100%!important;flex:0 0 100%!important;height:100%!important;-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important;position:relative!important;scroll-snap-align:start!important;width:100%!important}.i-amphtml-slide-item>*{height:100%;width:100%;overflow:hidden!important}.i-amphtml-slide-item-show{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.i-amphtml-carousel-end-marker,.i-amphtml-carousel-start-marker{background-color:transparent!important;display:block!important;-webkit-box-flex:0!important;-ms-flex:0 0 1px!important;flex:0 0 1px!important;height:100%!important;position:relative!important;scroll-snap-align:start!important;width:1px!important}.i-amphtml-carousel-start-marker{-webkit-box-ordinal-group:0!important;-ms-flex-order:-1!important;order:-1!important;margin-left:-1px!important}.i-amphtml-carousel-end-marker{-webkit-box-ordinal-group:100000001!important;-ms-flex-order:100000000!important;order:100000000!important;margin-right:-1px!important}.i-amphtml-slidescroll-no-snap.i-amphtml-slides-container{-webkit-scroll-snap-type:none!important;scroll-snap-type:none!important}.i-amphtml-slidescroll-no-snap .i-amphtml-slide-item{scroll-snap-align:none!important}.i-amphtml-slidescroll-no-snap.i-amphtml-slides-container.i-amphtml-no-scroll{-webkit-overflow-scrolling:auto!important}.amp-scrollable-carousel-slide{display:inline-block!important;margin-left:8px}.amp-scrollable-carousel-slide:first-child{margin-left:0px}.i-amphtml-scrollable-carousel-container{white-space:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important}
/*# sourceURL=/extensions/amp-carousel/0.1/amp-carousel.css*/</style><meta content="width=device-width,minimum-scale=1,initial-scale=1" name="viewport"><meta content="vendor=doubleclick,type=impression-id,value=CM6Vy-Xl_N4CFcJgwQods48FUA" name="amp4ads-id"><meta content="noindex" name="robots"><link as="script" href="https://cdn.ampproject.org/amp4ads-v0.js" rel="preload"><script async="" src="https://cdn.ampproject.org/amp4ads-v0.js"></script><script async="" custom-element="amp-accordion" src="https://cdn.ampproject.org/v0/amp-accordion-0.1.js"></script><script async="" custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script><script async="" custom-element="amp-anim" src="https://cdn.ampproject.org/v0/amp-anim-0.1.js"></script><script async="" custom-element="amp-audio" src="https://cdn.ampproject.org/v0/amp-audio-0.1.js"></script><script async="" custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script><script async="" custom-element="amp-fit-text" src="https://cdn.ampproject.org/v0/amp-fit-text-0.1.js"></script><script async="" custom-element="amp-font" src="https://cdn.ampproject.org/v0/amp-font-0.1.js"></script><script async="" custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script><script async="" custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script><style amp-custom="">.body {}
/*# sourceURL=/extensions/amp-carousel/0.1/amp-carousel.css*/</style><meta content="width=device-width,minimum-scale=1,initial-scale=1" name="viewport"><meta content="vendor=doubleclick,type=impression-id,value=CM6Vy-Xl_N4CFcJgwQods48FUA" name="amp4ads-id"><meta content="noindex" name="robots"><link as="script" href="http://localhost:__TEST_SERVER_PORT__/dist/amp-inabox.js" rel="preload"><script async="" src="http://localhost:__TEST_SERVER_PORT__/dist/amp-inabox.js"></script><script async="" custom-element="amp-accordion" src="http://localhost:__TEST_SERVER_PORT__/dist/v0/amp-accordion-0.1.max.js"></script><script async="" custom-element="amp-analytics" src="http://localhost:__TEST_SERVER_PORT__/dist/v0/amp-analytics-0.1.max.js"></script><script async="" custom-element="amp-anim" src="http://localhost:__TEST_SERVER_PORT__/dist/v0/amp-anim-0.1.max.js"></script><script async="" custom-element="amp-audio" src="http://localhost:__TEST_SERVER_PORT__/dist/v0/amp-audio-0.1.max.js"></script><script async="" custom-element="amp-carousel" src="http://localhost:__TEST_SERVER_PORT__/dist/v0/amp-carousel-0.1.max.js"></script><script async="" custom-element="amp-fit-text" src="http://localhost:__TEST_SERVER_PORT__/dist/v0/amp-fit-text-0.1.max.js"></script><script async="" custom-element="amp-font" src="http://localhost:__TEST_SERVER_PORT__/dist/v0/amp-font-0.1.max.js"></script><script async="" custom-element="amp-form" src="http://localhost:__TEST_SERVER_PORT__/dist/v0/amp-form-0.1.max.js"></script><script async="" custom-element="amp-social-share" src="http://localhost:__TEST_SERVER_PORT__/dist/v0/amp-social-share-0.1.max.js"></script><style amp-custom="">.body {}
</style></head><body marginwidth="0" marginheight="0" class="amp-mode-mouse" style="opacity: 1; visibility: visible; animation: none 0s ease 0s 1 normal none running;"><amp-pixel allow-ssr-img="" class="i-amphtml-layout-fixed i-amphtml-layout-size-defined i-amphtml-element" i-amphtml-layout="fixed" i-amphtml-ssr="" src="http:__VIEW_URL__" style="width:1px;height:1px;" aria-hidden="true"><img src="http:__VIEW_URL__"></amp-pixel><a href="https://google.com/" target="_blank">
<amp-img class="i-amphtml-layout-fixed i-amphtml-layout-size-defined i-amphtml-element i-amphtml-layout" height="200" i-amphtml-layout="fixed" i-amphtml-ssr="" src="http://localhost:__TEST_SERVER_PORT__/test/fixtures/served/cupcake.jpg" style="width:300px;height:200px;" width="300">
<img class="i-amphtml-fill-content i-amphtml-replaced-content" decoding="async" src="http://localhost:__TEST_SERVER_PORT__/test/fixtures/served/cupcake.jpg"></amp-img>
Expand Down Expand Up @@ -35,4 +35,4 @@
}
</script>
</amp-analytics>
<amp-analytics class="i-amphtml-layout-fixed i-amphtml-layout-size-defined i-amphtml-element" i-amphtml-layout="fixed" style="width:1px;height:1px;" trigger="immediate" aria-hidden="true" hidden=""><script type="application/json">{"transport": {"beacon": false, "xhrpost": false},"requests": {"visibility1": "http:__ACTIVE_VIEW_URL__"},"triggers": {"continuousVisible": {"on": "visible","request": ["visibility1"],"visibilitySpec": {"selector": ":root","visiblePercentageMin": 50,"continuousTimeMin": 1000}}}}</script></amp-analytics></body></html>
<amp-analytics class="i-amphtml-layout-fixed i-amphtml-layout-size-defined i-amphtml-element" i-amphtml-layout="fixed" style="width:1px;height:1px;" trigger="immediate" aria-hidden="true" hidden=""><script type="application/json">{"transport": {"beacon": false, "xhrpost": false},"requests": {"visibility1": "http:__ACTIVE_VIEW_URL__"},"triggers": {"continuousVisible": {"on": "visible","request": ["visibility1"],"visibilitySpec": {"selector": ":root","visiblePercentageMin": 40,"continuousTimeMin": 1000}}}}</script></amp-analytics></body></html>
13 changes: 13 additions & 0 deletions test/fixtures/served/iframe-safeframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<!-- saved from url=(0069)http://tpc.googlesyndication.com/safeframe/1-0-32/html/container.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>SafeFrame Container</title>
<script>
(function(){var aa="function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b},l;if("function"==typeof Object.setPrototypeOf)l=Object.setPrototypeOf;else{var n;a:{var ba={h:!0},q={};try{q.__proto__=ba;n=q.h;break a}catch(a){}n=!1}l=n?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var r=l,t=this;var v=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]},w=function(a,b){return a<b?-1:a>b?1:0};var x;a:{var y=t.navigator;if(y){var z=y.userAgent;if(z){x=z;break a}}x=""};var B=function(a){B[" "](a);return a};B[" "]=function(){};var da=function(a,b){var c=ca;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var ea=-1!=x.indexOf("Opera"),C=-1!=x.indexOf("Trident")||-1!=x.indexOf("MSIE"),D=-1!=x.indexOf("Edge"),E=-1!=x.indexOf("Gecko")&&!(-1!=x.toLowerCase().indexOf("webkit")&&-1==x.indexOf("Edge"))&&!(-1!=x.indexOf("Trident")||-1!=x.indexOf("MSIE"))&&-1==x.indexOf("Edge"),F=-1!=x.toLowerCase().indexOf("webkit")&&-1==x.indexOf("Edge"),G;a:{var H="",I=function(){var a=x;if(E)return/rv:([^\);]+)(\)|;)/.exec(a);if(D)return/Edge\/([\d\.]+)/.exec(a);if(C)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(F)return/WebKit\/(\S+)/.exec(a);if(ea)return/(?:Version)[ \/]?(\S+)/.exec(a)}();I&&(H=I?I[1]:"");if(C){var K,M=t.document;K=M?M.documentMode:void 0;if(null!=K&&K>parseFloat(H)){G=String(K);break a}}G=H}var fa=G,ca={},N=function(a){return da(a,function(){for(var b=0,c=v(String(fa)).split("."),e=v(String(a)).split("."),d=Math.max(c.length,e.length),f=0;0==b&&f<d;f++){var h=c[f]||"",g=e[f]||"";do{h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];if(0==h[0].length&&0==g[0].length)break;b=w(0==h[1].length?0:parseInt(h[1],10),0==g[1].length?0:parseInt(g[1],10))||w(0==h[2].length,0==g[2].length)||w(h[2],g[2]);h=h[3];g=g[3]}while(0==b)}return 0<=b})};var O=null,P=null,ia=function(a){var b=a.length,c=0;"="===a[b-2]?c=2:"="===a[b-1]&&(c=1);var e=new Uint8Array(Math.ceil(3*b/4)-c),d=0;ha(a,function(a){e[d++]=a});return e.subarray(0,d)},ha=function(a,b){function c(b){for(;e<a.length;){var c=a.charAt(e++),f=P[c];if(null!=f)return f;if(!/^[\s\xa0]*$/.test(c))throw Error("Unknown base64 encoding at char: "+c);}return b}ja();for(var e=0;;){var d=c(-1),f=c(0),h=c(64),g=c(64);if(64===g&&-1===d)break;b(d<<2|f>>4);64!=h&&(b(f<<4&240|h>>2),64!=g&&b(h<<6&192|g))}},ja=function(){if(!O){O={};P={};for(var a=0;65>a;a++)O[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a),P[O[a]]=a,62<=a&&(P["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(a)]=a)}};var Q=function(a,b){if(a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(void 0,a[c],c,a)};var R=function(a,b,c){c=void 0===c?{}:c;this.error=a;this.context=b.context;this.line=b.line||-1;this.msg=b.message||"";this.file=b.file||"";this.id=b.id||"jserror";this.meta=c};var ka=/^https?:\/\/(\w|-)+\.cdn\.ampproject\.(net|org)(\?|\/|$)/,la=function(a,b){this.a=a;this.b=b},S=function(a,b){this.url=a;this.g=!!b;this.depth=null};var ma=function(a){t.google_image_requests||(t.google_image_requests=[]);var b=t.document.createElement("img");b.src=a;t.google_image_requests.push(b)};var T=function(){this.c="&";this.f=!1;this.b={};this.j=0;this.a=[]},U=function(a,b){var c={};c[a]=b;return[c]},W=function(a,b,c,e,d){var f=[];Q(a,function(a,g){(a=V(a,b,c,e,d))&&f.push(g+"="+a)});return f.join(b)},V=function(a,b,c,e,d){if(null==a)return"";b=b||"&";c=c||",$";"string"==typeof c&&(c=c.split(""));if(a instanceof Array){if(e=e||0,e<c.length){for(var f=[],h=0;h<a.length;h++)f.push(V(a[h],b,c,e+1,d));return f.join(c[e])}}else if("object"==typeof a)return d=d||0,2>d?encodeURIComponent(W(a,b,c,e,d+1)):"...";return encodeURIComponent(String(a))},X=function(a,b,c,e){a.a.push(b);a.b[b]=U(c,e)},oa=function(a){var b="https://pagead2.googlesyndication.com/pagead/gen_204?id=jserror&",c=na(a)-27;if(0>c)return"";a.a.sort(function(a,b){return a-b});for(var e=null,d="",f=0;f<a.a.length;f++)for(var h=a.a[f],g=a.b[h],m=0;m<g.length;m++){if(!c){e=null==e?h:e;break}var k=W(g[m],a.c,",$");if(k){k=d+k;if(c>=k.length){c-=k.length;b+=k;d=a.c;break}else a.f&&(d=c,k[d-1]==a.c&&--d,b+=k.substr(0,d),d=a.c,c=0);e=null==e?h:e}}a="";null!=e&&(a=d+"trn="+e);return b+a+""},na=function(a){var b=1,c;for(c in a.b)b=c.length>b?c.length:b;return 3997-b-a.c.length-1};var pa=function(a){if(.01>Math.random())try{if(a instanceof T)var b=a;else b=new T,Q(a,function(a,c){var f=b,e=f.j++;a=U(c,a);f.a.push(e);f.b[e]=a});var c=oa(b);c&&ma(c)}catch(e){}};var sa=function(a){try{var b=new T;b.f=!0;X(b,1,"context",507);if(!(a.error&&a.meta&&a.id)){var c=a;a=new qa(ra(c),c.fileName,c.lineNumber)}a.msg&&X(b,2,"msg",a.msg.substring(0,512));a.file&&X(b,3,"file",a.file);0<a.line&&X(b,4,"line",a.line);var e=[a.meta||{}];b.a.push(5);b.b[5]=e;c=t;a=[];e=null;do{var d=c;try{var f;if(f=!!d&&null!=d.location.href)b:{try{B(d.foo);f=!0;break b}catch(A){}f=!1}var h=f}catch(A){h=!1}if(h){var g=d.location.href;e=d.document&&d.document.referrer||null}else g=e,e=null;a.push(new S(g||""));try{c=d.parent}catch(A){c=null}}while(c&&d!=c);g=0;for(var m=a.length-1;g<=m;++g)a[g].depth=m-g;d=t;if(d.location&&d.location.ancestorOrigins&&d.location.ancestorOrigins.length==a.length-1)for(m=1;m<a.length;++m){var k=a[m];k.url||(k.url=d.location.ancestorOrigins[m-1]||"",k.g=!0)}var J=new S(t.location.href,!1);d=null;var L=a.length-1;for(k=L;0<=k;--k){var p=a[k];!d&&ka.test(p.url)&&(d=p);if(p.url&&!p.g){J=p;break}}p=null;var va=a.length&&a[L].url;0!=J.depth&&va&&(p=a[L]);var u=new la(J,p);u.b&&X(b,6,"top",u.b.url||"");X(b,7,"url",u.a.url||"");pa(b)}catch(A){try{pa({context:"ecmserr",rctx:507,msg:ra(A),url:u&&u.a.url})}catch(za){}}},ra=function(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=": "+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack){a=a.stack;var c=b;try{-1==a.indexOf(c)&&(a=c+"\n"+a);for(var e;a!=e;)e=a,a=a.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");b=a.replace(/\n */g,"\n")}catch(d){b=c}}return b},qa=function(a,b,c){R.call(this,Error(a),{message:a,file:void 0===b?"":b,line:void 0===c?-1:c})},Y=qa;Y.prototype=aa(R.prototype);Y.prototype.constructor=Y;if(r)r(Y,R);else for(var Z in R)if("prototype"!=Z)if(Object.defineProperties){var ta=Object.getOwnPropertyDescriptor(R,Z);ta&&Object.defineProperty(Y,Z,ta)}else Y[Z]=R[Z];Y.m=R.prototype;var ua=E||F||C&&N(11)||D;var wa=/^([^;]+);(\d+);([\s\S]*)$/,xa=function(){var a=wa.exec(window.name);if(null===a)throw Error("Cannot parse serialized data");var b=+a[2],c=a[3];if(b>c.length)throw Error("Cannot parse serialized data");return{l:a[1],content:c.substr(0,b),i:c.substr(b)}};var ya=function(){var a=window.location.hash;return a?(a=a.match(/[&#]eid=([\d,]+)/))?a[1].split(","):[]:[]};(function(a){try{var b=xa(),c=ya(),e=JSON.parse(b.i),d=e.encryptionMode;a(b.content,void 0===d?null:d,function(a){ua&&(window.name="");e.goog_safeframe_hlt&&(t.goog_safeframe_hlt=e.goog_safeframe_hlt);e._context&&(t.AMP_CONTEXT_DATA=e._context);t.sf_={v:b.l,exp:c,cfg:e};var d=window;if(ua)d=d.document,d.open("text/html","replace"),d.write(a),d.close();else{var g;if(g=C&&N(7)&&!N(10))g=navigator.userAgent.match(/Trident\/([0-9]+.[0-9]+)/),g=6>(g?parseFloat(g[1]):0);if(g)a:{for(g=0;g<a.length;++g)if(127<a.charCodeAt(g)){g=!0;break a}g=!1}if(g){a=unescape(encodeURIComponent(a));g=Math.floor(a.length/2);for(var f=[],k=0;k<g;++k)f[k]=String.fromCharCode(256*a.charCodeAt(2*k+1)+a.charCodeAt(2*k));1==a.length%2&&(f[g]=a.charAt(a.length-1));a=f.join("")}d.goog_content=a;d.location.replace("javascript:window.goog_content")}},function(a){sa(a)})}catch(f){sa(f)}})(function(a,b,c){if(2===b){a=ia(a);b=[];for(var e=0,d=0;e<a.length;){var f=a[e++];if(128>f)b[d++]=String.fromCharCode(f);else if(191<f&&224>f){var h=a[e++];b[d++]=String.fromCharCode((f&31)<<6|h&63)}else if(239<f&&365>f){h=a[e++];var g=a[e++],m=a[e++];f=((f&7)<<18|(h&63)<<12|(g&63)<<6|m&63)-65536;b[d++]=String.fromCharCode(55296+(f>>10));b[d++]=String.fromCharCode(56320+(f&1023))}else h=a[e++],g=a[e++],b[d++]=String.fromCharCode((f&15)<<12|(h&63)<<6|g&63)}a=b.join("");a&&(b=a.toLowerCase(),a=-1<b.indexOf("<!doctype")||-1<b.indexOf("<html")?a:"<html><head></head><body>"+a+"</body></html>")}c(a)});}).call(this);
</script>
</head>
<body>


</body></html>
Loading

0 comments on commit 09af523

Please sign in to comment.