Last active
February 18, 2019 08:35
-
-
Save cahva/f7a7de13a4905fedaf1713fe034513a6 to your computer and use it in GitHub Desktop.
Change priv policy text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/* wait for element to be ready and then change text */ | |
function tryEl(e) { | |
var privEl = document.querySelector('.video-player'); | |
if (!privEl) { | |
window.requestAnimationFrame(tryEl); | |
} else { | |
changeText(privEl); | |
} | |
} | |
function changeText(el) { | |
var youtubeUrl = 'https://www.youtube.com/embed/GmzWbgzo6B4'; | |
var iFrame = document.createElement('iframe'); | |
window.initBitmovin = function() { return false; } | |
bitmovin = null; | |
iFrame.setAttribute('style', 'width: 100%'); | |
iFrame.setAttribute('frameborder', '0'); | |
iFrame.setAttribute('allowfullscreen','1'); | |
iFrame.setAttribute('allow', 'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture'); | |
iFrame.setAttribute('src', youtubeUrl); | |
el.appendChild(iFrame); | |
} | |
tryEl(); | |
</script> | |
<iframe width="560" height="315" src="https://www.youtube.com/embed/GmzWbgzo6B4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment