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

Function openRowAndGetMessageText

content/gmail-mail.js:525–541  ·  view source on GitHub ↗
(row)

Source from the content-addressed store, hash-verified

523}
524
525async function openRowAndGetMessageText(row) {
526 simulateClick(row);
527
528 for (let i = 0; i < 20; i++) {
529 const messageContainer = document.querySelector('div[role="main"] .a3s, div[role="main"] [data-message-id], h2[data-thread-perm-id]');
530 if (messageContainer || !/#inbox/i.test(location.href)) {
531 break;
532 }
533 await sleep(250);
534 }
535
536 await sleep(900);
537 const main = document.querySelector('div[role="main"]');
538 const text = normalizeText(main?.innerText || document.body?.innerText || document.body?.textContent || '');
539 await returnToInbox();
540 return text;
541}
542
543async function handlePollEmail(step, payload) {
544 const {

Callers 1

handlePollEmailFunction · 0.85

Calls 4

simulateClickFunction · 0.85
sleepFunction · 0.85
returnToInboxFunction · 0.85
normalizeTextFunction · 0.70

Tested by

no test coverage detected