Add files via upload

This commit is contained in:
James 2025-10-06 02:30:31 -07:00 committed by GitHub
parent 2a8ed0782c
commit 2dac0e7e0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 225 additions and 206 deletions

View File

@ -460,7 +460,26 @@
</div>
</div>
</div>
<script>
// --- clear cart helper ---
function clearCart() {
try { localStorage.removeItem('asa_cart'); } catch { }
if (window.state && state.cart) {
state.cart = {};
if (typeof renderCart === 'function') renderCart();
}
}
// --- clear on successful return from Stripe ---
(function () {
const qp = new URLSearchParams(location.search);
if (qp.get('ok') === '1') {
clearCart();
// optional: remove ?ok=1 from the URL bar
history.replaceState(null, '', location.pathname);
}
})();
</script>
<script>
const API = "https://affiliated-lets-automatic-oak.trycloudflare.com";
const CAPACITY_IDS = new Set(['server1', 'server2', 'server3']);