diff --git a/send.ts b/send.ts index 0501aa3..299fb2b 100644 --- a/send.ts +++ b/send.ts @@ -20,7 +20,12 @@ } if (!res.ok && method === "PUT") { - window.alert("please start send_vrc_desktop."); + chrome.notifications.create({ + type: "basic", + iconUrl: "./icon.png", + title: "send_vrc", + message: "please start send_vrc_desktop.", + }); } }) .catch((e) => { @@ -30,7 +35,12 @@ toVRC(url, "PUT"); } if (method === "PUT") { - window.alert("please start send_vrc_desktop."); + chrome.notifications.create({ + type: "basic", + iconUrl: "./icon.png", + title: "send_vrc", + message: "please start send_vrc_desktop.", + }); } }); }; diff --git a/static/manifest.json b/static/manifest.json index 99340b2..4bbc495 100644 --- a/static/manifest.json +++ b/static/manifest.json @@ -13,6 +13,12 @@ "background": { "service_worker": "send.js" }, - "permissions": ["activeTab", "contextMenus", "clipboardRead", "scripting"], + "permissions": [ + "activeTab", + "contextMenus", + "clipboardRead", + "notifications", + "scripting" + ], "host_permissions": ["http://localhost:11400/*"] }