I just wanted to know if it is possible
https://alertifyjs.com
I've tried injecting the
<script src="//cdn.jsdelivr.net/npm/[email protected]/build/alertify.min.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/build/css/alertify.min.css"/>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/build/css/themes/default.min.css"/>
But when i try to alertify.alert('test') it tells me that alertify is undefined
#Help integrating AlertifyJS into remote url based electron app
16 messages · Page 1 of 1 (latest)
I've also double checked if the <script></script> and <link> and it is actually in the code
The injection code :
const js = `
let ntf = document.createElement("script");
ntf.src = "//cdn.jsdelivr.net/npm/[email protected]/build/alertify.min.js";
let ntcss = document.createElement("link");
ntcss.rel = "stylesheet";
ntcss.href = "//cdn.jsdelivr.net/npm/[email protected]/build/css/alertify.min.css";
let ntth = document.createElement("link");
ntth.rel = "stylesheet";
ntth.href = "//cdn.jsdelivr.net/npm/[email protected]/build/css/themes/default.min.css";
document.head.appendChild(ntf);
document.head.appendChild(ntcss);
document.head.appendChild(ntth);
`
win.webContents.once('dom-ready', () => {
win.webContents.executeJavaScript(js);
})
You can check in devtools
the code is actually showing in devtools
Fix errors
how ? how can i bypass content policy violation
Fix csp