- Joined
- Dec 31, 2022
- Messages
- 12
- Reaction score
- 1
Hi, I'm using a Chrome extension. I have a problem with this (saved) page:
https://miospaziodigitale.w3spaces.com/lista_report.html#
This script autoclicks the first print item of the list in "Description" (that is, in the example, "Stampa etichetta - inv. : 59949"),
The autoclick correctly opens this kind of window:
https://polormb.sebina.it/sebina/ge...e/stpEtiColloc1672484520087_01.pdf?id=3873631
The problem is that this window also opens (but shouldn't) when I select and delete (top right) an item from the "Descrizione" list, as in this example:
Is it possible to fix the script to avoid this effect? Thanks
https://miospaziodigitale.w3spaces.com/lista_report.html#
This script autoclicks the first print item of the list in "Description" (that is, in the example, "Stampa etichetta - inv. : 59949"),
JavaScript:
(() => {
var links = document.querySelectorAll("a[href='#']");
for(let i=0; i<links.length; i++){
var text = links[i].innerHTML;
if(text.includes("Stampa etichetta")) {
links[i].click();
break;
}
}
})();
The autoclick correctly opens this kind of window:
https://polormb.sebina.it/sebina/ge...e/stpEtiColloc1672484520087_01.pdf?id=3873631
The problem is that this window also opens (but shouldn't) when I select and delete (top right) an item from the "Descrizione" list, as in this example:
Is it possible to fix the script to avoid this effect? Thanks