Skip to content

Instantly share code, notes, and snippets.

@werty1st
Last active August 29, 2015 14:06
Show Gist options
  • Save werty1st/b311278457707a73bcb2 to your computer and use it in GitHub Desktop.
Save werty1st/b311278457707a73bcb2 to your computer and use it in GitHub Desktop.
var style = '.videoWrapper { position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 50px; height: 0;} .videoWrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:none;}';
var htmlDiv = document.createElement('style');
htmlDiv.innerHTML = style;
document.getElementsByTagName('head')[0].appendChild(htmlDiv);
String.prototype.toDOM=function(){
var d=document
,i
,a=d.createElement("div")
,b=d.createDocumentFragment();
a.innerHTML=this;
while(i=a.firstChild)b.appendChild(i);
return b;
};
var c = document.getElementsByClassName("bgDDDDDD")[0]
var s = '<div class="videoWrapper"><iframe src="https://player.zdf.de/zdf/gruenderpreis/miniplayer/indexs.html?mediaID=1822600" allowfullscreen scrolling="no"/></div>';
var videoz = s.toDOM();
c.parentElement.replaceChild(videoz,c);
/*
google-chrome --disable-web-security
s=document.createElement('script');
s.setAttribute("src","https://rawgit.com/werty1st/b311278457707a73bcb2/raw/1a4a299a7b4fac4a4a68de5fd53248b85dd790b6/sparkasse.js")
document.getElementsByTagName('head')[0].appendChild(s);
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment