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

Function refreshInbox

content/qq-mail.js:138–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136// ============================================================
137
138async function refreshInbox() {
139 // Try multiple strategies to refresh the mail list
140
141 // Strategy 1: Click any visible refresh button
142 const refreshBtn = document.querySelector('[class*="refresh"], [title*="刷新"]');
143 if (refreshBtn) {
144 simulateClick(refreshBtn);
145 console.log(QQ_MAIL_PREFIX, 'Clicked refresh button');
146 await sleep(500);
147 return;
148 }
149
150 // Strategy 2: Click inbox in sidebar to reload list
151 const sidebarInbox = document.querySelector('a[href*="inbox"], [class*="folder-item"][class*="inbox"], [title="收件箱"]');
152 if (sidebarInbox) {
153 simulateClick(sidebarInbox);
154 console.log(QQ_MAIL_PREFIX, 'Clicked sidebar inbox');
155 await sleep(500);
156 return;
157 }
158
159 // Strategy 3: Click the folder name in toolbar
160 const folderName = document.querySelector('.toolbar-folder-name');
161 if (folderName) {
162 simulateClick(folderName);
163 console.log(QQ_MAIL_PREFIX, 'Clicked toolbar folder name');
164 await sleep(500);
165 }
166}
167
168// ============================================================
169// Verification Code Extraction

Callers 1

handlePollEmailFunction · 0.70

Calls 2

simulateClickFunction · 0.85
sleepFunction · 0.85

Tested by

no test coverage detected