import Mellowtel from "mellowtel";
let mellowtel;
(async () => {
mellowtel = new Mellowtel("<YOUR_CONFIGURATION_KEY>");
await mellowtel.initBackground();
})();
// ユーザーが拡張機能をアンインストールしたときにフィードバックページを開く
chrome.runtime.onInstalled.addListener(async function(details) {
console.log("Extension Installed or Updated");
// インストールと更新を別々に処理したい場合
/**
if(details.reason === "install"){
// 初回インストールを処理するための関数を呼び出す
} else if(details.reason === "update") {
// 更新を処理するための関数を呼び出す
}
**/
// ユーザー設定を処理するためにawait mellowtel.generateAndOpenOptInLink(); 詳細については: opt-in-out docs
const uninstallURl = await mellowtel.generateFeedbackLink();
chrome.runtime.setUninstallURL(uninstallURl);
});