create alerts interface

This commit is contained in:
buzzcode2007 2024-03-20 23:32:55 +08:00
parent c62146b834
commit 716d4ac3e5

18
gui/scripts/alerts.js Normal file
View file

@ -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);
};