An 80’s throwback valentine from your admirers at Grist

View the video in your browser

Happy Valentine’s Day! At Grist, our hearts are set on inspiring action to solve the climate crisis — and we couldn’t do it without friends and supporters like you. So, Team Grist put together a little something to show you our deep appreciation and affection for being you. Thanks for being part of the Grist community. Now it’s your chance to say anything. Let us know why you support or read Grist. We want to hear from you!
    <form id="wpcom-iframe-form-dbf82629cf646504dd5dfc75ddd948ff-5e4653a510c37"  method="post" action="https://wpcomwidgets.com/?wpcom_origin=https%3A%2F%2Fgrist.wordpress.com" style="display: none">
                        <input type="hidden" name="width" value="" />
                        <input type="hidden" name="height" value="" />
                        <input type="hidden" name="frameborder" value="0" />
                        <input type="hidden" name="style" value="" />
                        <input type="hidden" name="class" value="" />
                        <input type="hidden" name="scrolling" value="no" />
                        <input type="hidden" name="webkitallowfullscreen" value="" />
                        <input type="hidden" name="mozallowfullscreen" value="" />
                        <input type="hidden" name="allowfullscreen" value="" />
                        <input type="hidden" name="resize" value="0" />
                        <input type="hidden" name="replace_attributes" value="1" />
                        <input type="hidden" name="name" value="" />
                        <input type="hidden" name="fallback" value="&lt;p class=&quot;protected-embed-fallback&quot;&gt;This embed is invalid&lt;/p&gt;" />
                        <input type="hidden" name="_data" value="PHNjcmlwdCBhc3luYyBzcmM9Imh0dHBzOi8vbW9kdWxlcy53ZWFyZWhlYXJrZW4uY29tL2dyaXN0L2VtYmVkLzQ5NzQuanMiPjwvc2NyaXB0Pg==,fc1b1971a82d7c4cabc543ebf0ec6191a6f9a5ac" />
                        <input type="hidden" name="_tag" value="protected-iframe" />
                        <input type="hidden" name="_hash" value="dbf82629cf646504dd5dfc75ddd948ff" />
                </form>

            <iframe
                    name="wpcom-iframe-dbf82629cf646504dd5dfc75ddd948ff-5e4653a510c37"
        id="wpcom-iframe-dbf82629cf646504dd5dfc75ddd948ff-5e4653a510c37"
        frameborder="0"
        scrolling="no"
                                webkitallowfullscreen mozallowfullscreen allowfullscreen            class="wpcom-protected-iframe "
    ></iframe>

    <script type="text/javascript">
    ( function() {
        var func = function() {
            var iframe_form = document.getElementById('wpcom-iframe-form-dbf82629cf646504dd5dfc75ddd948ff-5e4653a510c37');
            var iframe = document.getElementById('wpcom-iframe-dbf82629cf646504dd5dfc75ddd948ff-5e4653a510c37');
            if ( iframe_form && iframe ) {
                iframe_form.submit();
                iframe.onload = function() {
                    iframe.contentWindow.postMessage( {
                        'msg_type': 'poll_size',
                        'frame_id': 'wpcom-iframe-dbf82629cf646504dd5dfc75ddd948ff-5e4653a510c37'
                    }, 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( 'readystatechange', function(){ 
if (document.readyState === 'complete') { func.apply(); } }, false ); } else if ( document.attachEvent ) { document.attachEvent( 'onreadystatechange', func ); } } )();

This story was originally published by Grist with the headline An 80’s throwback valentine from your admirers at Grist on Feb 14, 2020.

Leave a Reply