adding events is called within the builder
This commit is contained in:
		
							parent
							
								
									37a85f2841
								
							
						
					
					
						commit
						a5256d9a21
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		|  | @ -15,12 +15,14 @@ async function build() { | ||||||
| 
 | 
 | ||||||
| 	let window = new windowman(); | 	let window = new windowman(); | ||||||
| 	window.sync(); | 	window.sync(); | ||||||
|  | 	 | ||||||
|  | 	events(window); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
| 		Define the mapping of each button. | 		Define the mapping of each button. | ||||||
| 		*/ | 		*/ | ||||||
| function events() { | function events(window) { | ||||||
| 	if (document.querySelector(`[data-action="filters,update"]`)) { | 	if (document.querySelector(`[data-action="filters,update"]`)) { | ||||||
| 		document | 		document | ||||||
| 			.querySelector(`[data-action="filters,update"]`) | 			.querySelector(`[data-action="filters,update"]`) | ||||||
|  | @ -28,7 +30,7 @@ function events() { | ||||||
| 				let filters = new ( | 				let filters = new ( | ||||||
| 					await import(chrome.runtime.getURL(`scripts/filters.js`)) | 					await import(chrome.runtime.getURL(`scripts/filters.js`)) | ||||||
| 				).default(); | 				).default(); | ||||||
| 				await filters.update(); | 				filters.update(); | ||||||
| 			}); | 			}); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -70,12 +72,11 @@ function events() { | ||||||
| 
 | 
 | ||||||
| //main();
 | //main();
 | ||||||
| function load() { | function load() { | ||||||
|  | 	build(); | ||||||
|  | 	 | ||||||
| 	document.addEventListener("DOMContentLoaded", function () { | 	document.addEventListener("DOMContentLoaded", function () { | ||||||
| 		M.AutoInit(); | 		M.AutoInit(); | ||||||
| 		events(); |  | ||||||
| 	}); | 	}); | ||||||
| 
 |  | ||||||
| 	build(); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| load(); | load(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue