JSFiddle - React, Tailwind, and code Playground
by icodeforlove
JavaScript
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == variable) {
return decodeURIComponent(pair[1]);
}
}
}
document.body.innerHTML = '<iframe src="http://player.vimeo.com/video/' + getQueryVariable('id') + '?title=0&byline=0&portrait=0&autoplay=true" frameborder="0" style="position: absolute; left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%;"></iframe>';