Since it shared with the loader, make sure that elements exist before adding
This commit is contained in:
		
							parent
							
								
									bb6becc909
								
							
						
					
					
						commit
						914cd5ff74
					
				
					 1 changed files with 6 additions and 8 deletions
				
			
		|  | @ -129,19 +129,17 @@ class Page_Popup extends Page { | ||||||
| 			ELEMENT.removeAttribute(`data-action`); | 			ELEMENT.removeAttribute(`data-action`); | ||||||
| 		}); | 		}); | ||||||
| 
 | 
 | ||||||
| 		console.log(this[`elements`]); | 		(this[`elements`][`button`][`open,settings`]) ? this[`elements`][`button`][`open,settings`].addEventListener("click", () => { | ||||||
| 
 |  | ||||||
| 		this[`elements`][`button`][`open,settings`].addEventListener("click", () => { |  | ||||||
| 			chrome.runtime.openOptionsPage(); | 			chrome.runtime.openOptionsPage(); | ||||||
| 		}); | 		}) : false; | ||||||
| 
 | 
 | ||||||
| 		this[`elements`][`button`][`open,help`].addEventListener("click", () => { | 		(this[`elements`][`button`][`open,help`]) ? this[`elements`][`button`][`open,help`].addEventListener("click", () => { | ||||||
| 			new Window(`help.htm`); | 			new Window(`help.htm`); | ||||||
| 		}); | 		}) : false;  | ||||||
| 
 | 
 | ||||||
| 		this[`elements`][`button`][`analysis,reload`].addEventListener("click", () => { | 		(this[`elements`][`button`][`analysis,reload`]) ? this[`elements`][`button`][`analysis,reload`].addEventListener("click", () => { | ||||||
| 			this.send(); | 			this.send(); | ||||||
| 		}); | 		}) : false; | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue