forked from savioseb/youtuber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
youtuber.html
51 lines (47 loc) · 1.75 KB
/
youtuber.html
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello Static World</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=320, user-scalable=no">
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<script src="https://code.jquery.com/jquery-1.12.3.js" integrity="sha256-1XMpEtA4eKXNNpXcJ1pmMPs8JV+nwLdEqwiJeCQEkyc=" crossorigin="anonymous"></script>
<style type="text/css">
html,body,iframe{
margin: 0;
padding:0;
width: 100%;
height:100%;
background-color:#000;
}
</style>
</head>
<body>
</body>
<script>
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : sParameterName[1];
}
}
};
$(document).ready(function(){
let id = getUrlParameter('id');
$('body').html('<iframe src="https://www.youtube.com/embed/'+id+'?modestbranding=1&autoplay=1&autohide=1&showinfo=0&rel=0" frameborder="0" allowfullscreen=""></iframe>');
$('iframe').height($(window).height());
$('iframe').width($(window).width());
$(window).resize(function(){
$('iframe').height($(window).height());
$('iframe').width($(window).width());
});
});
</script>
</html>