anticipate tab updating away from a supported site
This commit is contained in:
		
							parent
							
								
									7380a326a3
								
							
						
					
					
						commit
						8ce5ca7137
					
				
					 1 changed files with 24 additions and 24 deletions
				
			
		|  | @ -4,32 +4,32 @@ import Tabs from '/scripts/GUI/tabs.js'; | ||||||
| import {session} from '/scripts/secretariat.js'; | import {session} from '/scripts/secretariat.js'; | ||||||
| 
 | 
 | ||||||
| class IconIndicator { | class IconIndicator { | ||||||
|      /* | 	/* | ||||||
|      Update the icon.  | 	Update the icon.  | ||||||
|       | 	  | ||||||
|      @param {string} state The state to update the icon to.  | 	@param {string} state The state to update the icon to.  | ||||||
|      */ | 	*/ | ||||||
|      static update(state = false) { | 	static update(state = false) { | ||||||
|           (Image.get(((state) ? `default` : 'disabled'))).then((ICON) => { | 		(Image.get(((state) ? `default` : 'disabled'))).then((ICON) => { | ||||||
|                (Tabs.query(null, 0)).then((DATA) => { | 			(Tabs.query(null, 0)).then((DATA) => { | ||||||
|                     BrowserIcon.set({"Icon": ICON}, {"tabId": DATA.id}); | 				BrowserIcon.set({"Icon": ICON}); | ||||||
|                }); | 			}); | ||||||
|           }) | 		}) | ||||||
|      } | 	} | ||||||
| 
 | 
 | ||||||
|      /*  | 	/*  | ||||||
|      Indicate that the website is supported through icon change.  | 	Indicate that the website is supported through icon change.  | ||||||
|      */ | 	*/ | ||||||
|      static async enable() { | 	static async enable() { | ||||||
|           IconIndicator.update(true); | 		IconIndicator.update(true); | ||||||
|      } | 	} | ||||||
| 
 | 
 | ||||||
|      /*  | 	/*  | ||||||
|      Indicate that the website isn't supported through icon change.  | 	Indicate that the website isn't supported through icon change.  | ||||||
|      */ | 	*/ | ||||||
|      static async disable() { | 	static async disable() { | ||||||
|           // IconIndicator.update(false);
 | 		IconIndicator.update(false); | ||||||
|      } | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export {IconIndicator as default}; | export {IconIndicator as default}; | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue