Changes to lcp-button

This commit is contained in:
Jeremy Rangel
2024-12-31 18:53:46 -08:00
parent 2df16e37a8
commit 741d39a962
94 changed files with 1159 additions and 138 deletions

View File

@ -1,10 +1,17 @@
document.addEventListener('DOMContentLoaded', function () {
console.log('DOMContentLoaded event triggered');
const installButtons = document.querySelectorAll('.install-btn');
const uninstallButtons = document.querySelectorAll('.uninstall-btn');
console.log('Install buttons:', installButtons);
console.log('Uninstall buttons:', uninstallButtons);
// Handle Install button click
installButtons.forEach(function (button) {
button.addEventListener('click', function () {
console.log('Adding install listener to button', button);
button.addEventListener('click', function (event) {
event.preventDefault(); // Prevent default form submission or page reload
console.log('Install button clicked');
const iconSetId = this.getAttribute('data-icon-set-id');
console.log('Icon Set ID:', iconSetId);
@ -36,7 +43,9 @@ document.addEventListener('DOMContentLoaded', function () {
// Handle Uninstall button click
uninstallButtons.forEach(function (button) {
button.addEventListener('click', function () {
console.log('Adding uninstall listener to button', button);
button.addEventListener('click', function (event) {
event.preventDefault(); // Prevent default form submission or page reload
console.log('Uninstall button clicked');
const iconSetId = this.getAttribute('data-icon-set-id');
console.log('Icon Set ID for uninstall:', iconSetId);