()
| 336 | // ============================================================ |
| 337 | |
| 338 | async 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 |
no test coverage detected