(theme: Theme, dynamicThemeFixes: DynamicThemeFix[] | null, iframe: boolean)
| 667 | * TODO: expose this function to API builds via src/api function enable() |
| 668 | */ |
| 669 | export function createOrUpdateDynamicTheme(theme: Theme, dynamicThemeFixes: DynamicThemeFix[] | null, iframe: boolean): void { |
| 670 | const dynamicThemeFix = selectRelevantFix(document.location.href, dynamicThemeFixes); |
| 671 | |
| 672 | // Most websites will have only the generic fix applied ('*'), some will have generic fix and one site-specific fix (two in total), |
| 673 | // and very few will have multiple site-specific fixes |
| 674 | // TODO: add a navigation listener here for this case |
| 675 | |
| 676 | createOrUpdateDynamicThemeInternal(theme, dynamicThemeFix, iframe); |
| 677 | } |
| 678 | |
| 679 | let prevTheme: Theme | null = null; |
| 680 | let prevFixes: DynamicThemeFix | null = null; |
no test coverage detected