Autoclick on print confirmation – JavaScript – SitePoint - Freelance Bargain

Breaking



Tuesday 15 November 2022

Autoclick on print confirmation – JavaScript – SitePoint

Hi, from a Chrome extension I would like to auto-click on (print) confirmation but this script partially works:

setTimeout(function()
{ labels = document.querySelectorAll('label'); if (labels[1].innerText == "Modello di stampa") {document.getElementsByClassName("button confirm")[0].click();}
},500);

Because the page refreshes repeatedly. Could you help me please? Thank you
Here is the saved static page (the site is restricted):
link

FYI, the script for the “report” click (third small icon at the top from right to left) is identical but works well and without repetitions because it links to the next page and not to the same page:

setTimeout(function()
{ labels = document.querySelectorAll('label'); if (labels[1].innerText == "Modello di stampa") {document.getElementsByClassName("reports")[0].click();}
},2000);

Can I do something to avoid repeating clicks in the first script? Thanks

Techyrack Website stock market day trading and youtube monetization and adsense Approval

Adsense Arbitrage website traffic Get Adsense Approval Google Adsense Earnings Traffic Arbitrage YouTube Monetization YouTube Monetization, Watchtime and Subscribers Ready Monetized Autoblog



from Web Development – My Blog https://ift.tt/uvXwKLp
via IFTTT

No comments:

Post a Comment