blob: e37fbbfc25bb4dc4407659ac51e887cf39627811 [file] [log] [blame]
export var unifiedProfilesFix = {
checkIframe(iframe) {
var srcRegex = /support.*\.google\.com\/profile\//;
return srcRegex.test(iframe.src ?? '');
},
fixIframe(iframe) {
console.info('[unifiedProfilesFix] Fixing unified profiles iframe');
var url = new URL(iframe.src);
url.searchParams.set('dark', 1);
iframe.src = url.href;
},
};