7-in-1 (YH705) - 在线游戏,资料库(图,游戏ROM等)
<script>function isMobile() {
return /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}
function toggleFullscreen(iframeId) {
const iframe = document.getElementById(iframeId);
if (!iframe) return;
if (!document.fullscreenElement) {
// 进入全屏
if (iframe.requestFullscreen) {
iframe.requestFullscreen();
} else if (iframe.webkitRequestFullscreen) { /* Safari */
iframe.webkitRequestFullscreen();
} else if (iframe.msRequestFullscreen) { /* IE11 */
iframe.msRequestFullscreen();
}
} else {
// 退出全屏
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitExitFullscreen) { /* Safari */
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) { /* IE11 */
document.msExitFullscreen();
}
}
}
function handleFullscreenChange() {
const fullscreenBtn = document.getElementById('fullscreenBtn');
const iframe = document.getElementById('gameIframe');
if (fullscreenBtn && iframe) {
if (document.fullscreenElement) {
fullscreenBtn.innerHTML = '退出全屏';
// 全屏时隐藏控制条,给iframe更多空间
document.getElementById('controls').style.display = 'none';
} else {
fullscreenBtn.innerHTML = '全屏游戏 (横屏最佳)';
// 退出全屏时显示控制条
document.getElementById('controls').style.display = 'flex';
}
}
}
// 监听全屏状态变化
document.addEventListener('fullscreenchange', handleFullscreenChange);
document.addEventListener('webkitfullscreenchange', handleFullscreenChange);
document.addEventListener('msfullscreenchange', handleFullscreenChange);
if (isMobile()) {
document.write(`
<div style="position: relative; width: 100%; padding-bottom: 75%; background: #000;">
<!-- 控制条 - 覆盖整个iframe区域并居中 -->
<div id="controls" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; display: flex; justify-content: center; align-items: center; background: #333333; background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48cGF0dGVybiBpZD0icGF0dGVybiIgeD0iMCIgeT0iMCIgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiBwYXR0ZXJuVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBwYXR0ZXJuVHJhbnNmb3JtPSJyb3RhdGUoNDUpIj48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4xKSI+PC9yZWN0PjxyZWN0IHg9IjIwIiB5PSIwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiPjwvcmVjdD48cmVjdCB4PSIwIiB5PSIyMCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDAuMDUpIj48L3JlY3Q+PHJlY3QgeD0iMjAiIHk9IjIwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4xKSI+PC9yZWN0PjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSIgb3BhY2l0eT0iMC4zIj48L3JlY3Q+PC9zdmc+'); background-repeat: repeat; background-size: auto;">
<div style="position: relative; z-index: 2; padding: 30px; background: rgba(51, 51, 51, 0.8); border-radius: 15px; backdrop-filter: blur(5px);">
<button id="fullscreenBtn" onclick="toggleFullscreen('gameIframe')"
style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 15px 35px;
border-radius: 30px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 12px;
position: relative;
z-index: 3;">
<svg style="width: 24px; height: 24px; fill: currentColor;" viewBox="0 0 24 24">
<path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/>
</svg>
全屏游戏 (横屏最佳)
</button>
</div>
</div>
<!-- 游戏iframe -->
<iframe id="gameIframe"
src="https://www.retrogames.cc/embed/44106-7-grand-dad.html"
scrolling="no"
border="0" frameborder="no" framespacing="0" allowfullscreen="true"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; z-index: 1;">
</iframe>
</div>
<style>
#fullscreenBtn:hover {
transform: translateY(-3px);
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
}
#fullscreenBtn:active {
transform: translateY(0);
}
/* 控制条上的按钮容器效果 */
#controls > div {
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.1);
}
/* 全屏时的样式优化 */
:fullscreen #gameIframe {
width: 100vw;
height: 100vh;
}
:-webkit-full-screen #gameIframe {
width: 100vw;
height: 100vh;
}
:-moz-full-screen #gameIframe {
width: 100vw;
height: 100vh;
}
:-ms-fullscreen #gameIframe {
width: 100vw;
height: 100vh;
}
</style>
`);
} else {
document.write(`
<div style="width: 900px;">
<div style="position: relative; width: 100%; padding-bottom: 75%;">
<iframe src="https://www.retrogames.cc/embed/44106-7-grand-dad.html" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;"></iframe>
</div>
</div>
`);
}
</script>
<br><b>内容清单:</b><br>#图库<br>其他版<br>7-in-1 (YH705) (Unl) [!].nes<br>说明.txt<br><br>**** Hidden Message *****
页:
[1]