Spaces:
Running
Running
Upload skyscraper.html
Browse files- skyscraper.html +4 -35
skyscraper.html
CHANGED
|
@@ -376,41 +376,10 @@
|
|
| 376 |
</head>
|
| 377 |
|
| 378 |
<body>
|
| 379 |
-
<!--
|
| 380 |
-
<
|
| 381 |
-
(
|
| 382 |
-
|
| 383 |
-
Array.from(document.body.childNodes).forEach(function (node) {
|
| 384 |
-
// 清除裸文字節點
|
| 385 |
-
if (node.nodeType === 3 && node.textContent.trim()) {
|
| 386 |
-
node.textContent = '';
|
| 387 |
-
}
|
| 388 |
-
// 隱藏 HF 注入的未知元素(非我們自己的 DOM)
|
| 389 |
-
if (node.nodeType === 1 && !node.id && node.tagName !== 'CANVAS' && node.tagName !== 'SCRIPT' && !node.classList.contains('ov') && !node.classList.contains('glass') && !node.classList.contains('back-btn') && !node.classList.contains('hidden') && !['gameCanvas', 'hud', 'timer-bar', 'hint-panel', 'bottom-panel', 'start-screen', 'brief-screen', 'tut-modal', 'summary-screen', 'back-btn', 'gameover-screen'].includes(node.id)) {
|
| 390 |
-
// 可能是 HF 注入的元素,強制隱藏
|
| 391 |
-
node.style.display = 'none';
|
| 392 |
-
}
|
| 393 |
-
});
|
| 394 |
-
}
|
| 395 |
-
cleanHF();
|
| 396 |
-
document.addEventListener('DOMContentLoaded', cleanHF);
|
| 397 |
-
// MutationObserver:即時偵測 HF 異步注入的新節點
|
| 398 |
-
var obs = new MutationObserver(function (mutations) {
|
| 399 |
-
mutations.forEach(function (m) {
|
| 400 |
-
m.addedNodes.forEach(function (node) {
|
| 401 |
-
if (node.parentNode !== document.body) return;
|
| 402 |
-
if (node.nodeType === 3 && node.textContent.trim()) {
|
| 403 |
-
node.textContent = '';
|
| 404 |
-
}
|
| 405 |
-
});
|
| 406 |
-
});
|
| 407 |
-
});
|
| 408 |
-
obs.observe(document.body, { childList: true });
|
| 409 |
-
setTimeout(cleanHF, 300);
|
| 410 |
-
setTimeout(cleanHF, 1000);
|
| 411 |
-
setTimeout(cleanHF, 3000);
|
| 412 |
-
})();
|
| 413 |
-
</script>
|
| 414 |
<canvas id="gameCanvas"></canvas>
|
| 415 |
<div id="hud" class="hidden">
|
| 416 |
<div class="glass hud-box">
|
|
|
|
| 376 |
</head>
|
| 377 |
|
| 378 |
<body>
|
| 379 |
+
<!-- HuggingFace 注入文字遮罩:用固定定位的同色遮罩蓋住頂部注入的文字,不修改任何 DOM -->
|
| 380 |
+
<div id="hf-mask"
|
| 381 |
+
style="position:fixed;top:0;left:0;width:100%;height:30px;background:var(--bg);z-index:9999;pointer-events:none;">
|
| 382 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 383 |
<canvas id="gameCanvas"></canvas>
|
| 384 |
<div id="hud" class="hidden">
|
| 385 |
<div class="glass hud-box">
|