watch.html 996 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
<script>
    function refresh(node)
    {
        var sleep = 100;

        (function startRefresh()
        {
            if (node.complete !== true) {
                // If the previous image hasn't completed loading, skip this update and schedule a new one.
                // This prevents us from overloading weak connections with cancelled transfers.
                setTimeout(startRefresh, sleep);
                return;
            }

            var address;
            if (node.src.indexOf('?') > -1) {
            address = node.src.split('?')[0];
            } else {
            address = node.src;
            }
            node.src = address+"?time=" + new Date().getTime();

            setTimeout(startRefresh, sleep);
        })();

    }

    window.onload = function()
    {
        var node = document.getElementById('fullScreenshot');
        refresh(node);
    }
</script>

<p algin="center"><img id="fullScreenshot" src="wok/qemuscreenshot/last.png" /></p></div></div>