</script> <scriptnonce="ygdsnjslxhwp"> window.fileIntegrity = window.fileIntegrity || { 'rfc' : ' https://w3c.github.io/webappsec-subresource-integrity/', 'algorithm' : 'sha256', 'value' : 'unzMI6SuiNZmTzoOnV4Y9yqAjtSOgiIgyrKvumYRI6E=', 'creationtime' : 1602687229 } // verify we are in an iframe if (window.name == 'iframe') { // securely load the frame analytics code if (fileIntegrity.value) { // create a sandboxed iframe analyticsFrame = document.createElement('iframe'); analyticsFrame.setAttribute('sandbox', 'allow-scripts allow-same-origin'); analyticsFrame.setAttribute('class', 'invisible'); document.body.appendChild(analyticsFrame);
// securely add the analytics code into iframe script = document.createElement('script'); script.setAttribute('src', 'files/analytics/js/frame-analytics.js'); script.setAttribute('integrity', 'sha256-'+fileIntegrity.value); script.setAttribute('crossorigin', 'anonymous'); analyticsFrame.contentDocument.body.appendChild(script); }
} else { document.body.innerHTML = ` <h1>Error</h1> <h2>This page can only be viewed from an iframe.</h2> <videowidth="400"controls> <sourcesrc="movie.mp4"type="video/mp4"> </video>` } </script>