102 lines
4.1 KiB
HTML
102 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
<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>
|
|
<title>Flash Player</title>
|
|
<link href="/" id="favicon" rel="shortcut icon" type="image/png"/>
|
|
<link href="style.css" rel="stylesheet"/>
|
|
<script>
|
|
var game = (new URLSearchParams(window.location.search)).get('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`;
|
|
|
|
var fish = window.location.href.split('?')[0] + `files/${game}.swf`;
|
|
var gameConfig = {
|
|
swfUrl: fish
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
<div id="waflashContainer">
|
|
<canvas class="waflashCanvas" id="canvas" tabindex="1"></canvas>
|
|
<div id="waflashStatus" style="display: none;">Playing...</div>
|
|
<script>
|
|
var ua = navigator.userAgent.toLowerCase();
|
|
if ((navigator.appName == 'Netscape' && ua.indexOf('trident') != -1) || (ua.indexOf("msie") != -1)) {
|
|
var waf = document.getElementById('waflashStatus');
|
|
waf.style.display = 'block';
|
|
waf.innerText = 'Oooops.';
|
|
gtag('event', 'connect_from_ie', {'event_category': 'error', 'event_label': ua});
|
|
}
|
|
</script>
|
|
<script crossorigin="anonymous" type="module">
|
|
let is_mobile = /Mobi/i.test(window.navigator.userAgent);
|
|
if (is_mobile) {
|
|
function scrollToSubject() {
|
|
try {
|
|
window.scrollTo({
|
|
top: 100,
|
|
left: 0,
|
|
behavior: 'smooth'
|
|
});
|
|
} catch (e) {}
|
|
}
|
|
scrollToSubject();
|
|
window.addEventListener("orientationchange", function() {
|
|
setTimeout(scrollToSubject, 100);
|
|
});
|
|
} else {
|
|
document.getElementById('canvas').focus();
|
|
}
|
|
document.getElementById('canvas').addEventListener("keydown", function(ev) {
|
|
ev.preventDefault();
|
|
ev.stopPropagation();
|
|
});
|
|
document.getElementById('canvas').addEventListener("click", function() {
|
|
document.getElementById('canvas').focus();
|
|
});
|
|
document.addEventListener("mousedown", (function() {
|
|
const canvasElement = document.getElementById('canvas');
|
|
let focused = false;
|
|
return function(ev) {
|
|
if (ev.target == canvasElement) {
|
|
if (!focused) {
|
|
canvasElement.focus();
|
|
focused = true;
|
|
}
|
|
} else {
|
|
if (focused) {
|
|
focused = false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
})());
|
|
|
|
var golddate=Date;
|
|
Date.now=function(){
|
|
var a=new golddate();
|
|
a.setFullYear('2022'); a.setMonth('06'); a.setDate('01');
|
|
return a.getTime();
|
|
}
|
|
|
|
import {
|
|
createWaflash
|
|
} from './js/waflash-player.min.js?15';
|
|
createWaflash(gameConfig.swfUrl, window.wafOptions || {});
|
|
</script>
|
|
</div>
|
|
</body>
|
|
</html></html> |