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) { | ||||
7 | console.info('[unifiedProfilesFix] Fixing unified profiles iframe'); | ||||
8 | var url = new URL(iframe.src); | ||||
9 | url.searchParams.set('dark', 1); | ||||
10 | iframe.src = url.href; | ||||
11 | }, | ||||
12 | }; |