|
|
@ -659,6 +659,17 @@ const startup = async (is4chanX = true) => { |
|
|
|
if (init) |
|
|
|
return; |
|
|
|
init = true; |
|
|
|
|
|
|
|
window.addEventListener("securitypolicyviolation", (e) => { |
|
|
|
if (e.blockedURI.startsWith("blob")) { |
|
|
|
if (supportedMainDomain(location.host)) { |
|
|
|
fireNotification("error", "CSP is preventing PEE from running, add blob: to the allowed JS whitelist in 4chanX in Advanced Settings"); |
|
|
|
} else if (supportedAltDomain(location.host)) { |
|
|
|
fireNotification("error", "CSP is preventing PEE from running, use a CSP bypass extension like PEE-companion"); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
const meta = document.querySelector('meta[name="referrer"]') as HTMLMetaElement; |
|
|
|
const customStyles = document.createElement('style'); |
|
|
|
|
|
|
|