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

Function collectThreadRows

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

Source from the content-addressed store, hash-verified

334}
335
336function collectThreadRows() {
337 const candidates = [
338 ...document.querySelectorAll('tr.zA'),
339 ...document.querySelectorAll('tr[role="row"]'),
340 ];
341
342 const rows = [];
343 const seenRows = new Set();
344
345 candidates.forEach((row) => {
346 if (!row || seenRows.has(row)) return;
347 seenRows.add(row);
348
349 if (!isDisplayed(row)) return;
350
351 const text = normalizeText(row.textContent || row.innerText || '');
352 if (!text) return;
353
354 if (
355 row.matches('tr.zA')
356 || row.querySelector('.bog, .y6, .y2, .afn, [data-thread-id], [data-legacy-thread-id], [data-legacy-last-message-id]')
357 || /openai|chatgpt|verify|verification|code|验证码/i.test(text)
358 ) {
359 rows.push(row);
360 }
361 });
362
363 return rows;
364}
365
366function getRowPreviewText(row) {
367 const sender = normalizeText(

Callers 4

getCurrentMailIdsFunction · 0.85
ensureInboxReadyFunction · 0.85
returnToInboxFunction · 0.85
handlePollEmailFunction · 0.85

Calls 2

isDisplayedFunction · 0.85
normalizeTextFunction · 0.70

Tested by

no test coverage detected