(documentURL: string, fixes: DynamicThemeFix[] | null)
| 630 | } |
| 631 | |
| 632 | function selectRelevantFix(documentURL: string, fixes: DynamicThemeFix[] | null): DynamicThemeFix | null { |
| 633 | if (!fixes) { |
| 634 | return null; |
| 635 | } |
| 636 | if (fixes.length === 0 || fixes[0].url[0] !== '*') { |
| 637 | logWarn('selectRelevantFix() failed to construct a single fix', documentURL, fixes); |
| 638 | return null; |
| 639 | } |
| 640 | |
| 641 | const relevantFixIndex = findRelevantFix(documentURL, fixes); |
| 642 | return relevantFixIndex ? combineFixes([fixes[0], fixes[relevantFixIndex]]) : fixes[0]; |
| 643 | } |
| 644 | |
| 645 | function tryInvertChromePDF() { |
| 646 | if (!document.body || !chrome.dom) { |
no test coverage detected