MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / refreshInbox

Function refreshInbox

content/mail-163.js:338–362  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

336// ============================================================
337
338async function refreshInbox() {
339 // Try toolbar "刷 新" button
340 const toolbarBtns = document.querySelectorAll('.nui-btn .nui-btn-text');
341 for (const btn of toolbarBtns) {
342 if (btn.textContent.replace(/\s/g, '') === '刷新') {
343 btn.closest('.nui-btn').click();
344 console.log(MAIL163_PREFIX, 'Clicked "刷新" button');
345 await sleep(800);
346 return;
347 }
348 }
349
350 // Fallback: click sidebar "收 信"
351 const shouXinBtns = document.querySelectorAll('.ra0');
352 for (const btn of shouXinBtns) {
353 if (btn.textContent.replace(/\s/g, '').includes('收信')) {
354 btn.click();
355 console.log(MAIL163_PREFIX, 'Clicked "收信" button');
356 await sleep(800);
357 return;
358 }
359 }
360
361 console.log(MAIL163_PREFIX, 'Could not find refresh button');
362}
363
364// ============================================================
365// Verification Code Extraction

Callers 1

handlePollEmailFunction · 0.70

Calls 1

sleepFunction · 0.85

Tested by

no test coverage detected