(row)
| 364 | } |
| 365 | |
| 366 | function getRowPreviewText(row) { |
| 367 | const sender = normalizeText( |
| 368 | row.querySelector('.zF, .yP, span[email], [email]')?.textContent |
| 369 | || row.querySelector('[email]')?.getAttribute?.('email') |
| 370 | || '' |
| 371 | ); |
| 372 | |
| 373 | const subject = normalizeText( |
| 374 | row.querySelector('.bog [data-thread-id], .bog [data-legacy-thread-id], .bog, .y6, .bqe')?.textContent |
| 375 | || '' |
| 376 | ); |
| 377 | |
| 378 | const digest = normalizeText( |
| 379 | row.querySelector('.y2, .afn, .a4W, .bog + .y2')?.textContent |
| 380 | || '' |
| 381 | ); |
| 382 | |
| 383 | const timeText = normalizeText( |
| 384 | row.querySelector('td.xW span')?.getAttribute?.('title') |
| 385 | || row.querySelector('td.xW span, td.xW time')?.getAttribute?.('title') |
| 386 | || row.querySelector('td.xW span, td.xW time')?.textContent |
| 387 | || '' |
| 388 | ); |
| 389 | |
| 390 | const fullText = normalizeText(row.textContent || row.innerText || ''); |
| 391 | |
| 392 | return { |
| 393 | sender, |
| 394 | subject, |
| 395 | digest, |
| 396 | timeText, |
| 397 | fullText, |
| 398 | combinedText: normalizeText([sender, subject, digest, timeText, fullText].filter(Boolean).join(' ')), |
| 399 | }; |
| 400 | } |
| 401 | |
| 402 | function getRowTimestamp(row) { |
| 403 | const timeCell = row.querySelector('td.xW span, td.xW time, td.xW [title]'); |
no test coverage detected