From 716d4ac3e5defd04e00bfc8d10a9a27596a1611a Mon Sep 17 00:00:00 2001 From: buzzcode2007 <73412182+buzz_lightsnack_2007@users.noreply.github.com> Date: Wed, 20 Mar 2024 23:32:55 +0800 Subject: [PATCH] create alerts interface --- gui/scripts/alerts.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gui/scripts/alerts.js diff --git a/gui/scripts/alerts.js b/gui/scripts/alerts.js new file mode 100644 index 0000000..b9e7a6b --- /dev/null +++ b/gui/scripts/alerts.js @@ -0,0 +1,18 @@ +/* alerts.js +Alert management system. +*/ + +export function confirm_action() { + let user_response = false; + + (async () => { + // Import the module. + let reader = await import(chrome.runtime.getURL("gui/scripts/read.JS")); + + // Get the user response. + user_response = confirm(reader.read("localized", `GUI_alert_confirm_action_text`)); + + })(); + // Return the user response. + return (user_response); +}; \ No newline at end of file