Spaces:
Sleeping
Sleeping
Update templates/menu.html
Browse files- templates/menu.html +1 -24
templates/menu.html
CHANGED
@@ -774,30 +774,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
774 |
});
|
775 |
});
|
776 |
|
777 |
-
|
778 |
-
function roundRewardPoints() {
|
779 |
-
// Get the reward points element
|
780 |
-
let rewardPointsElement = document.getElementById('reward-points');
|
781 |
-
|
782 |
-
// Check if the element exists in the DOM
|
783 |
-
if (rewardPointsElement) {
|
784 |
-
let rewardPointsText = rewardPointsElement.innerText.trim(); // Get and trim the value to remove any extra spaces
|
785 |
-
|
786 |
-
// Check if the innerText is a valid number
|
787 |
-
let rewardPoints = parseFloat(rewardPointsText);
|
788 |
-
|
789 |
-
// If it's a valid number, round it to 1 decimal place
|
790 |
-
if (!isNaN(rewardPoints)) {
|
791 |
-
rewardPointsElement.innerText = rewardPoints.toFixed(1); // Round to 1 decimal place
|
792 |
-
} else {
|
793 |
-
console.error("Reward points value is not a valid number:", rewardPointsText);
|
794 |
-
}
|
795 |
-
} else {
|
796 |
-
console.error("Reward points element is missing.");
|
797 |
-
}
|
798 |
-
}
|
799 |
-
// Run the function when the page loads
|
800 |
-
window.onload = roundRewardPoints;
|
801 |
|
802 |
</script>
|
803 |
|
|
|
774 |
});
|
775 |
});
|
776 |
|
777 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
778 |
|
779 |
</script>
|
780 |
|