set the side panel's trigger behavior
Add the module "user_actions.js" to the GUI scripts folder. This module will handle the user's actions, such as opening the side panel.
This commit is contained in:
		
							parent
							
								
									2bd5310e40
								
							
						
					
					
						commit
						12f9562aa6
					
				
					 2 changed files with 9 additions and 0 deletions
				
			
		
							
								
								
									
										7
									
								
								scripts/GUI/user_actions.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								scripts/GUI/user_actions.js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | ||||||
|  | export default class user_actions { | ||||||
|  | 	static init() { | ||||||
|  | 		chrome.sidePanel | ||||||
|  | 			.setPanelBehavior({ openPanelOnActionClick: true }) | ||||||
|  | 			.catch((error) => console.error(error)); | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  | @ -3,5 +3,7 @@ Shop wisely with AI! | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| import fc from './fc.js'; | import fc from './fc.js'; | ||||||
|  | import user_actions from "./GUI/user_actions.js"; | ||||||
| 
 | 
 | ||||||
| fc.run(); | fc.run(); | ||||||
|  | user_actions.init(); | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue