create alerts interface
This commit is contained in:
		
							parent
							
								
									c62146b834
								
							
						
					
					
						commit
						716d4ac3e5
					
				
					 1 changed files with 18 additions and 0 deletions
				
			
		
							
								
								
									
										18
									
								
								gui/scripts/alerts.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								gui/scripts/alerts.js
									
										
									
									
									
										Normal 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); | ||||||
|  | }; | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue