Changes to lcp-button
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user