One Post. Three Rules. With Squeaking.

Our latest Rule Of Cuteness states: #61: “If you use another animal as your bed, that’s cute. Match that with #53: “If your (or someone else’s) ears or tail cover your face for the purposes of sleeping, that’s cute.” Whoops, almost forgot: “#07: A thing, accompanied by a smaller version of that thing, is always cute.”

Methinks we have a winner here. Speakers WAY up.

( function() {
var func = function() {
var iframe_form = document.getElementById(‘wpcom-iframe-form-7db63ef2f096e5b044158a2f554d406c-567aca977e7df’);
var iframe = document.getElementById(‘wpcom-iframe-7db63ef2f096e5b044158a2f554d406c-567aca977e7df’);
if ( iframe_form && iframe ) {
iframe_form.submit();
iframe.onload = function() {
iframe.contentWindow.postMessage( {
‘msg_type’: ‘poll_size’,
‘frame_id’: ‘wpcom-iframe-7db63ef2f096e5b044158a2f554d406c-567aca977e7df’
}, window.location.protocol + ‘//wpcomwidgets.com’ );
}
}

// Autosize iframe
var funcSizeResponse = function( e ) {
var origin = document.createElement( ‘a’ );
origin.href = e.origin;

// Verify message origin
if ( ‘wpcomwidgets.com’ !== origin.host )
return;

// Verify message is in a format we expect
if ( ‘object’ !== typeof e.data || undefined === e.data.msg_type )
return;

switch ( e.data.msg_type ) {
case ‘poll_size:response’:
var iframe = document.getElementById( e.data._request.frame_id );

if ( iframe && ” === iframe.width )
iframe.width = ‘100%’;
if ( iframe && ” === iframe.height )
iframe.height = parseInt( e.data.height );

return;
default:
return;
}
}

if ( ‘function’ === typeof window.addEventListener ) {
window.addEventListener( ‘message’, funcSizeResponse, false );
} else if ( ‘function’ === typeof window.attachEvent ) {
window.attachEvent( ‘onmessage’, funcSizeResponse );
}
}
if (document.readyState === ‘complete’) { func.apply(); /* compat for infinite scroll */ }
else if ( document.addEventListener ) { document.addEventListener( ‘DOMContentLoaded’, func, false ); }
else if ( document.attachEvent ) { document.attachEvent( ‘onreadystatechange’, func ); }
} )();

Originally seen on Imgur but the file was a bandwidth-crushing 87MB so we went with Instagram.

Filed under: Uncategorized Tagged: Matchingks, Snuggling, Speakers UP, The Rules of Cuteness

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s