Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ jobs:
profile: minimal
override: true

- name: Test
run: cargo test

- name: Run Clippy
run: cargo clippy --all-features -- -W clippy::pedantic
7 changes: 3 additions & 4 deletions get-price.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ async function getPrice() {
* @returns {Promise<void>}
*/
async function outputPrice(id, priceStr) {
if (!id) {
return;
}
const el = document.getElementById(id);
if (!el) {
console.error(`get-price: element with id ${id} not found`);
return;
}

Expand All @@ -50,7 +48,7 @@ async function outputPrice(id, priceStr) {
}
}

// Auto-initialize after DOM is ready
// Output prices to elements
document.addEventListener('DOMContentLoaded', async () => {
let price;
try {
Expand All @@ -61,4 +59,5 @@ document.addEventListener('DOMContentLoaded', async () => {

await outputPrice('buynow-annual-price', price['annual']);
await outputPrice('buynow-annual-per-month-price', price['annual_per_month']);
await outputPrice('buynow-annual-renewal-price', price['annual_renewal_price']);
});
Loading