Adrià Vilanova Martínez | 3465e77 | 2021-07-11 19:18:41 +0200 | [diff] [blame] | 1 | export var unifiedProfilesFix = { |
| 2 | checkIframe(iframe) { |
| 3 | var srcRegex = /support.*\.google\.com\/profile\//; |
| 4 | return srcRegex.test(iframe.src ?? ''); |
| 5 | }, |
| 6 | fixIframe(iframe) { |
Adrià Vilanova Martínez | 5b98793 | 2023-11-16 02:18:44 +0100 | [diff] [blame] | 7 | console.debug('[unifiedProfilesFix] Fixing unified profiles iframe'); |
Adrià Vilanova Martínez | 3465e77 | 2021-07-11 19:18:41 +0200 | [diff] [blame] | 8 | var url = new URL(iframe.src); |
| 9 | url.searchParams.set('dark', 1); |
| 10 | iframe.src = url.href; |
| 11 | }, |
| 12 | }; |