create-mellowtel-extension
Version:
Create a new Mellowtel browser extension with one command
17 lines (12 loc) • 431 B
text/typescript
import Mellowtel from 'mellowtel';
export default defineBackground(() => {
let mellowtel: Mellowtel;
(async () => {
mellowtel = new Mellowtel(import.meta.env.VITE_MELLOWTEL_CONFIG_KEY!);
await mellowtel.initBackground();
})();
chrome.runtime.onInstalled.addListener(async function (details) {
console.log('Extension Installed or Updated', details);
await mellowtel.generateAndOpenOptInLink();
});
});