How do I use AlertifyJS dialogs in a browser extension (i.e. loading it in a JavaScript/TypeScript file rather than in HTML)?

54 Views Asked by At

My browser extension has an onboarding page, and I've implemented AlertifyJS in the tag of the HTML file as follows:

<head>
    <link rel="stylesheet" href="alertify.min.css"/>
    <script src="alertify.min.js"></script>
    <script type="module" src="onboarding.ts"></script>
</head>

No surprises here and this works fine. However, I now want to have Alertify dialogs not just on the onboarding page, but also on external websites on which the extension is activated. How do I get alertify.min.js and alertify.min.css into my content.ts script, such that it can bring up dialogs on any website? Thanks in advance.

0

There are 0 best solutions below