blob: e37fbbfc25bb4dc4407659ac51e887cf39627811 [file] [log] [blame]
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +02001export 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};