Snapshot: full project state

This commit is contained in:
2026-10-06 23:43:32 -07:00
commit 8e95d8a78c
16 changed files with 1002 additions and 0 deletions

15
patch_shim.py Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env python3
"""Add double-load guard to SatsSpin auth shim (prevents fetch recursion)."""
import io
P = "/opt/casino/dist/shim.js"
src = io.open(P, encoding="utf-8").read()
guard = " if (window.__satsspinShimLoaded) { return; }\n window.__satsspinShimLoaded = true;\n"
old = "(function () {\n 'use strict';\n"
assert old in src, "IIFE start not found"
if "__satsspinShimLoaded" not in src:
src = src.replace(old, old + guard, 1)
io.open(P, "w", encoding="utf-8").write(src)
print("SHIM GUARDED")
else:
print("ALREADY GUARDED")