From a444ff2d34fc4dc0aaa9463942a51c1b692672ec Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Mon, 15 Apr 2024 15:59:35 +0800 Subject: [PATCH] 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 --- scripts/external/watch.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/external/watch.js b/scripts/external/watch.js index f5aa45c..3a5e260 100644 --- a/scripts/external/watch.js +++ b/scripts/external/watch.js @@ -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.