new ruffle
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 362 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 128 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 165 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 23 KiB |
@@ -1,42 +1,58 @@
|
||||
<html>
|
||||
<head>
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-7L02W3ZMS5"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-7L02W3ZMS5');
|
||||
</script>
|
||||
<script async="" crossorigin="anonymous" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5648726754785335"></script>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
||||
<title>Flash Player</title>
|
||||
<link href="/" id="favicon" rel="shortcut icon" type="image/png"/>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div height="100%" id="ruffle" width="100%"></div>
|
||||
<script src="ruffle.js"></script>
|
||||
<script>
|
||||
var game = (new URLSearchParams(window.location.search)).get('game');
|
||||
if (game){
|
||||
document.title = (game.replace(/-/g,' ')).toLowerCase().split(' ').map(function(word) {return word[0].toUpperCase() + word.substr(1);}).join(' ');
|
||||
document.querySelector('#favicon').href = `images/${game}.png`;
|
||||
|
||||
window.RufflePlayer = window.RufflePlayer || {};
|
||||
window.addEventListener("load", (event) => {
|
||||
const ruffle = window.RufflePlayer.newest();
|
||||
const player = ruffle.createPlayer();
|
||||
const container = document.getElementById("ruffle");
|
||||
player.id = "player";
|
||||
player.style.width = "100%";
|
||||
player.style.height = "100%";
|
||||
container.appendChild(player);
|
||||
player.load(`files/${game}.swf`);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Flash Player</title>
|
||||
<link id="favicon" rel="shortcut icon" type="image/png" href="/">
|
||||
</head>
|
||||
<body>
|
||||
<div id="ruffle" width="100%" height="100%"></div>
|
||||
<script src="ruffle.js"></script>
|
||||
<script>
|
||||
var defaultGame = (new URLSearchParams(window.location.search)).get('game');
|
||||
if (!defaultGame) {
|
||||
/*var fileInput = document.createElement('input');
|
||||
fileInput.type = 'file';
|
||||
fileInput.id = 'fileInput';
|
||||
var uploadButton = document.createElement('button');
|
||||
uploadButton.textContent = 'Upload File';
|
||||
uploadButton.addEventListener('click', handleFileUpload);
|
||||
// Append elements to the body
|
||||
document.body.appendChild(fileInput);
|
||||
document.body.appendChild(uploadButton);
|
||||
|
||||
function handleFileUpload() {
|
||||
var uploadedFile = fileInput.files[0];
|
||||
if (uploadedFile) {
|
||||
// appears to take a url rather than local file
|
||||
load(uploadedFile);
|
||||
} else {
|
||||
alert('Please select a file to upload.');
|
||||
}
|
||||
}
|
||||
*/
|
||||
} else {
|
||||
document.title = (defaultGame.replace(/-/g, ' ')).toLowerCase().split(' ').map(function(word) {
|
||||
return word[0].toUpperCase() + word.substr(1);
|
||||
}).join(' ');
|
||||
document.querySelector('#favicon').href = `images/${defaultGame}.png`;
|
||||
load(`files/${defaultGame}.swf`);
|
||||
}
|
||||
|
||||
function load(game) {
|
||||
window.RufflePlayer = window.RufflePlayer || {};
|
||||
window.addEventListener("load", (event) => {
|
||||
const ruffle = window.RufflePlayer.newest();
|
||||
const player = ruffle.createPlayer();
|
||||
const container = document.getElementById("ruffle");
|
||||
player.id = "player";
|
||||
player.style.width = "100%";
|
||||
player.style.height = "100%";
|
||||
container.appendChild(player);
|
||||
//seems to be a path
|
||||
console.log(game);
|
||||
player.load(game);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||