-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
41 lines (34 loc) · 1.12 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Äpfel und Birnen</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
</head>
<body>
<div id="content">
<a href="#" id="fs">Vollbild</a>
</div>
<script type="text/javascript">
function fs_status() {
if(document.fullscreenElement) {
return true;
} else if(document.webkitFullscreenElement) {
return true;
} else if(document.mozFullScreenElement) {
return true;
} else {
return false;
}
}
function goFullscreen() {
if(fs_status()) { return; }
var el = document.getElementsByTagName('canvas')[0];
var requestFullScreen = el.requestFullscreen || el.msRequestFullscreen || el.mozRequestFullScreen || el.webkitRequestFullscreen;
if(requestFullScreen) {
requestFullScreen.call(el);
}
}
document.getElementById('fs').addEventListener('click', goFullscreen);
</script>
</body>
</html>