Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
fahadboss10 committed Nov 17, 2023
1 parent c084189 commit babc3b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,14 @@ <h1 style="text-align:center; padding: 10px 0; font-family: 'Lato', sans-serif;
}
}

document.addEventListener('DOMContentLoaded', function () {
window.addEventListener('load', function () {
setThemeBasedOnSystemPreference();

// Apply filter based on the URL parameter
const brandParam = new URLSearchParams(window.location.search).get('brand');
if (brandParam) {
const brand = Object.keys(BRAND_TO_ID).find(key => key.toLowerCase() === brandParam.toLowerCase());
setTimeout(() => filterByBrand(brand), 500); // Add a slight delay
filterByBrand(brand);
}
});

Expand Down

0 comments on commit babc3b5

Please sign in to comment.