MCPcopy Create free account
hub / github.com/QLHazyCoder/FlowPilot / findRefreshButton

Function findRefreshButton

content/gmail-mail.js:303–334  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301}
302
303function findRefreshButton() {
304 const selectors = [
305 'div[role="button"][data-tooltip="刷新"]',
306 'div[role="button"][aria-label="刷新"]',
307 'div[role="button"][data-tooltip*="刷新"]',
308 'div[role="button"][aria-label*="刷新"]',
309 'div[role="button"][data-tooltip="Refresh"]',
310 'div[role="button"][aria-label="Refresh"]',
311 'div[role="button"][data-tooltip*="Refresh"]',
312 'div[role="button"][aria-label*="Refresh"]',
313 'div[act="20"][role="button"]',
314 'div.asf.T-I-J3.J-J5-Ji',
315 ];
316
317 for (const selector of selectors) {
318 const matched = document.querySelector(selector);
319 const button = matched?.closest?.('[role="button"]') || matched;
320 if (button && isVisibleElement(button)) {
321 return button;
322 }
323 }
324
325 return Array.from(document.querySelectorAll('div[role="button"], button')).find((element) => {
326 const text = normalizeText(
327 element.getAttribute('aria-label')
328 || element.getAttribute('data-tooltip')
329 || element.getAttribute('title')
330 || element.textContent
331 );
332 return /刷新|Refresh/i.test(text);
333 }) || null;
334}
335
336function collectThreadRows() {
337 const candidates = [

Callers 1

refreshInboxFunction · 0.85

Calls 2

isVisibleElementFunction · 0.70
normalizeTextFunction · 0.70

Tested by

no test coverage detected