[mv3-safari] Fix broken zapper due to latest changes

Related commit:
22e848c9c2
This commit is contained in:
Raymond Hill 2025-04-21 12:58:44 -04:00
parent d17da2b081
commit d3f39c97d1
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -395,10 +395,15 @@ const bootstrap = async ( ) => {
zapperFramePort: port,
});
};
frame.onload = ( ) => {
if ( dynamicURL.protocol !== 'safari-web-extension:' ) {
frame.onload = ( ) => {
frame.onload = onZapperLoad;
frame.contentWindow.location = dynamicURL.href;
};
} else {
frame.onload = onZapperLoad;
frame.contentWindow.location = dynamicURL.href;
};
frame.setAttribute('src', dynamicURL.href);
}
document.documentElement.append(frame);
});
};