fix click published

This commit is contained in:
Admin 2025-08-13 14:09:17 +07:00
parent cbb2e21bcd
commit 4773ffd7b0
2 changed files with 17 additions and 18 deletions

File diff suppressed because one or more lines are too long

View File

@ -301,17 +301,14 @@ const handle = async (item: IItem) => {
await clickNext(); await clickNext();
if (import.meta.env.ENV === "prod") { await delay(200);
await delay(200);
await clickPublist(); await clickPublist();
}
return true; return true;
}; };
const closeTab = async (data: IItem) => { const closeTab = async (data: IItem) => {
await delay(1000);
chrome.runtime.sendMessage({ chrome.runtime.sendMessage({
type: "close-tab", type: "close-tab",
payload: data, payload: data,
@ -341,19 +338,21 @@ port.onMessage.addListener(async (message) => {
} finally { } finally {
await finistPublist(data, { published: true }); await finistPublist(data, { published: true });
await delay(2000);
await closeTab(data); await closeTab(data);
} }
} }
}); });
// async function init() { async function init() {
// const { data } = await axios.get("products/27"); const { data } = await axios.get("products/27");
// if (!data.data) return; if (!data.data) return;
// const item = data.data as IItem; const item = data.data as IItem;
// await handle(item); await handle(item);
// } }
// init(); init();