forked from gn-math/html
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path169.html
More file actions
36 lines (33 loc) · 1.17 KB
/
169.html
File metadata and controls
36 lines (33 loc) · 1.17 KB
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
<!DOCTYPE HTML>
<html>
<head>
<meta charset='utf8'>
<style> html, body { margin: 0; padding: 0; overflow: hidden; height: 100%; } #ruffle { width: 100%; height: 100%; } </style>
</head>
<body>
<div id='ruffle'></div>
<script src='https://unpkg.com/@ruffle-rs/ruffle'></script> <script> var swfobject = {};
swfobject.embedSWF = function (url, containerId) {
var ruffle = window.RufflePlayer.newest();
var container = document.getElementById(containerId);
var player = ruffle.createPlayer();
container.appendChild(player);
if (url) {
player.load({
url: url
});
} else {
console.error("No SWF file specified in the URL parameters.");
}
const resizePlayer = () => {
container.style.width = window.innerWidth + 'px';
container.style.height = window.innerHeight + 'px';
player.style.width = '100%';
player.style.height = '100%';
};
resizePlayer();
window.addEventListener('resize', resizePlayer);
};
swfobject.embedSWF("https://cdn.jsdelivr.net/gh/illusionTBA/React-Ruffle@f37551ff7c55cc61002445a0f1e334742f6832e4/public/swf/Bloxors.swf", 'ruffle'); </script>
</body>
</html>