grab the data by querying the tab
Tab switching events aren't enough nor universal.
This commit is contained in:
		
							parent
							
								
									fc8983c646
								
							
						
					
					
						commit
						b4ea93911e
					
				
					 1 changed files with 9 additions and 8 deletions
				
			
		
							
								
								
									
										13
									
								
								scripts/external/entries/manager.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								scripts/external/entries/manager.js
									
										
									
									
										vendored
									
									
								
							|  | @ -11,16 +11,17 @@ export default class EntryManager { | |||
|      constructor () { | ||||
|           this.instances = {}; | ||||
|           this.instances.menu = new MenuEntry(); | ||||
|           Tabs.addActionListener(`onActivated`, (data) => {this.check(data)}); | ||||
|           Tabs.addActionListener(`onActivated`, (data) => {this.check()}); | ||||
|      } | ||||
| 
 | ||||
|      async check(data) { | ||||
|           console.error(JSON.stringify(data)); | ||||
|           ((data != null && (typeof data).includes(`obj`)) ? ((data.tab) ? data.tab.url : false) : false)  | ||||
| 			? (!!await ((new filters).select(data.tab.url))) | ||||
|      async check() { | ||||
|           const DATA = await Tabs.query(null, 0) | ||||
| 
 | ||||
|           if (DATA.url) { | ||||
|                (!!await ((new filters).select(DATA.url))) | ||||
|                     ? (this.enable()) | ||||
|                     : (this.disable()) | ||||
| 			: false; | ||||
|           }; | ||||
|      } | ||||
| 
 | ||||
|      /*  | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue