Files
landing-factory/remove_dup_leaderboard.py
2026-10-06 23:43:32 -07:00

19 lines
795 B
Python

#!/usr/bin/env python3
"""Remove duplicate Leaderboard button (wallet row) from SatsSpin bundle."""
import io
B = "/opt/casino/dist/assets/index-CzzrlZy-.js"
bundle = io.open(B, encoding="utf-8").read()
old = ('s.jsxs("button",{onClick:()=>fe(!0),className:"flex items-center gap-1.5 px-3 py-2 '
'rounded-xl bg-amber-500/10 hover:bg-amber-500/20 text-amber-400 border '
'border-amber-500/30 text-xs font-bold transition-all cursor-pointer",'
'children:[s.jsx(xi,{className:"w-3.5 h-3.5"}),s.jsx("span",{className:"hidden '
'sm:inline",children:"Leaderboard"})]}),')
n = bundle.count(old)
assert n == 1, f"expected 1 match, found {n}"
bundle = bundle.replace(old, "", 1)
io.open(B, "w", encoding="utf-8").write(bundle)
print("DUPLICATE LEADERBOARD BUTTON REMOVED")