debugcheck-enhancelisted
Install: claude install-skill Nioris/project-forge
# Enhance Debug Panel — Runtime Checks
## Purpose
Current debugcheck.js says ✅ but moderation rejects. Why? It only does regex (static analysis). Real problems are RUNTIME: GameReady fires too early, language switches after UI visible, elements overflow on small screens, ads fire without user click. This skill adds runtime probes that catch what regex cannot.
## ⚠️ Rules
- Modify ONLY `templates/html5/debugcheck.js`
- Add NEW check categories — don't delete existing ones
- All new checks go into existing CATS array
- Keep activation: Ctrl+Shift+2 × 3 (panel UI)
- Keep same UI style (dc-* classes)
## 🔴 CRITICAL: Script Loading Order
debugcheck.js has TWO parts:
1. **PROBES** — timing hooks, monkey-patches — must run BEFORE game code
2. **PANEL UI** — display overlay — opens on Ctrl+Shift+2
Current problem: script in `</body>` = probes load AFTER game = miss GameReady timing.
**FIX: Move to `<head>` with defer:**
```html
<!-- In <head>, BEFORE game scripts: -->
<script src="debugcheck.js"></script>
<!-- NOT before </body> — too late for timing probes! -->
```
**CRITICAL: Games use SDK wrappers, not raw window.ysdk!**
Known wrappers to intercept: `window.ysdk`, `YandexSDK._ysdk`, `Plat.ysdk`, `Plat._ysdk`
Use BOTH: YaGames.init() interception (catches creation) + 50ms polling (catches wrappers).
NEVER use setTimeout(1000) — SDK initializes in 200-500ms, you'll miss it.
**Inside debugcheck.js — split into immediate probes + deferred panel:**
```javascript
// TOP OF FILE