Apple’s Samsung Apology Statement

As court-ordered, the apology message is on the apple.co.uk homepage, yet Apple’s pulling some JavaScript magic to keep it below the fold:

var HeroResize=AC.Class({initialize:function(b){this._height=null;this._hero=$(b);
AC.Object.synthesize(this);this.__boundResizeHero=this.resizeHero.bindAsEventListener(this);
if(typeof window.ontouchstart==="undefined"){this.resizeHero();Event.observe(window,"resize",this.__boundResizeHero)
}},setHeight:function(b){this._height=(b<0)?0:b;return this._height},resizeHero:function(){this.setHeight(parseInt(window.innerHeight||(window.document.documentElement.clientHeight||window.document.body.clientHeight),10)-310);
this.hero().style.height=this.height()+"px"}});Event.onDOMReady(function(){var b=new HeroResize("billboard")
});

The code resizes the iPad Mini ad so that the apology is not visible on the screen. Here's a screenshot with and without JavaScript enabled:


apple.co.uk - javascript enabled - with hero resize


apple.co.uk - javascript disabled - without hero resize

(via Reddit via Geert)

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.