Skip to content

Commit

Permalink
fix ruffle
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaTheLEGEND committed Feb 3, 2024
1 parent e9b9a39 commit 838b8cb
Showing 2 changed files with 51 additions and 35 deletions.
84 changes: 50 additions & 34 deletions FZ2.3-dev/File-Z-master/gfiles/flash/index.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,56 @@
<!DOCTYPE html>
<html data-ruffle-optout>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Ruffle Web Demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato" />
<link rel="icon" href="https://ruffle.rs/assets/favicon-32.png" sizes="32x32">
<link rel="icon" href="https://ruffle.rs/assets/favicon-64.png" sizes="64x64">
<link rel="icon" href="https://ruffle.rs/assets/favicon-180.png" sizes="180x180">
<style>
</style>
</head>
<body>
<div id="main" aria-label="Select a demo or drag an SWF">
<div id="overlay" class="hidden"></div>
<div id="ruffle-player"></div>
</div>
<script>
// Function to extract URL parameters
function getURLParameter(name) {
return new URLSearchParams(window.location.search).get(name);
}
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Ruffle Web Demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato" />
<link rel="icon" href="https://ruffle.rs/assets/favicon-32.png" sizes="32x32">
<link rel="icon" href="https://ruffle.rs/assets/favicon-64.png" sizes="64x64">
<link rel="icon" href="https://ruffle.rs/assets/favicon-180.png" sizes="180x180">
<style>
</style>
</head>
<body>
<div id="main" aria-label="Select a demo or drag an SWF">
<div id="overlay" class="hidden"></div>
<div id="ruffle-player"></div>
</div>
<script>
// Function to extract URL parameters
function getURLParameter(name) {
return new URLSearchParams(window.location.search).get(name);
}

// Check if 'swf' parameter is present in the URL
const swfURL = getURLParameter('swf');
if (swfURL) {
const rufflePlayer = document.getElementById('ruffle-player');
rufflePlayer.innerHTML = `
<object type="application/x-shockwave-flash" data="${swfURL}" allowfullscreen>
<param name="movie" value="${swfURL}">
<param name="wmode" value="transparent">
SWF file could not be loaded.
</object>
`;
}
</script>

<script>
document.addEventListener("DOMContentLoaded", function () {
setTimeout(function () {
var canvasElement = document.querySelector('#ruffle-player canvas');

// Check if 'swf' parameter is present in the URL
const swfURL = getURLParameter('swf');
if (swfURL) {
const rufflePlayer = document.getElementById('ruffle-player');
rufflePlayer.innerHTML = `
<object type="application/x-shockwave-flash" data="${swfURL}" allowfullscreen>
<param name="movie" value="${swfURL}">
<param name="wmode" value="transparent">
SWF file could not be loaded.
</object>
if (canvasElement) {
canvasElement.style.cssText = `
width: 100%;
height: 100vh;
/* Add any additional styles you want for the canvas element here */
`;
}
</script>
<script src="https://ruffle.rs/demo/index.js"></script>
</body>
}, 3000); // 3000 milliseconds (3 seconds)
});
</script>
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

<head>
<meta charset="utf-8">
<title>Hacker Typer</title>
<title>bible Typer</title>
<link href="style.css" rel="stylesheet" type="text/css"/>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"

0 comments on commit 838b8cb

Please sign in to comment.