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