make sure that the product details are loaded only when the website load is to complete

so as to avoid incomplete data from being scraped
This commit is contained in:
buzz-lightsnack-2007 2024-04-15 15:59:35 +08:00
parent 68636f4770
commit a444ff2d34

View file

@ -29,10 +29,11 @@ let main = (async () => {
console.log("ShopAI works here! Click on the button in the toolbar or website to start.");
// Show loading screen while the load is incomplete.
let PROC = new processor(matches);
// Begin only when the page is fully loaded.
window.addEventListener(`load`, (event) => {
// Begin processing.
let PROC = new processor(matches);
// Remove the loading screen.