Skip to content

Commit

Permalink
- Added shop forcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Koala3353 committed Apr 25, 2024
1 parent a7206c1 commit 014201d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions success.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ <h3 style="color: white" class="output-checkout-code">
</h3>
<!-- Add the button here -->
<div style="margin-top: 30px">
<a href="/404.html" class="btn btn-lg btn-primary redirect-shop"
>Claim</a
<a href="/404.html" target="_blank" class="btn btn-lg btn-primary redirect-shop"
>Claim Reward</a
>
</div>
</div>
Expand Down Expand Up @@ -376,8 +376,17 @@ <h3 class="fs-6 text-white" style="font-family: 'Coolvetica Rg'">
var urlParams = new URLSearchParams(window.location.search);
var code = urlParams.get("code");
var name = urlParams.get("name");
$(".output-checkout-code").text("You have failed the exam by getting " + code + " points (3 points for passing). Kindly try again.");
$(".redirect-shop").attr("href", "/exam.html?activity=");
// hashmap of name to url
var nameToUrl = {
"Amazon": "https://www.amazon.com/gc/redeem",
"Apple": "http://apple.com/redeem",
"Google": "https://play.google.com/redeem",
"Playstation": "https://www.playstation.com/en-ph/support/store/redeem-ps-store-voucher-code/",
"Steam": "https://store.steampowered.com/account/redeemwalletcode",
"Xbox": "https://redeem.microsoft.com/",
};
$(".output-checkout-code").html("You successfully claimed the voucher. Here is the code: <b>" + code + "</b>");
$(".redirect-shop").attr("href", nameToUrl[name]);
$(".loading").hide();
});
</script>
Expand Down

0 comments on commit 014201d

Please sign in to comment.