Only inform one time about supported site
This commit is contained in:
		
							parent
							
								
									e92baff49b
								
							
						
					
					
						commit
						45b3388851
					
				
					 1 changed files with 3 additions and 6 deletions
				
			
		
							
								
								
									
										9
									
								
								scripts/external/watch.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								scripts/external/watch.js
									
										
									
									
										vendored
									
									
								
							|  | @ -20,9 +20,6 @@ export default class watch { | ||||||
| 	@param {dictionary} filter the filter to work with | 	@param {dictionary} filter the filter to work with | ||||||
| 	*/ | 	*/ | ||||||
| 	static async process(filter) { | 	static async process(filter) { | ||||||
| 		// Let user know that the website is supported, if ever they have opened the console. 
 |  | ||||||
| 		new logging((new texts(`message_external_supported`)).localized); |  | ||||||
| 
 |  | ||||||
| 		document.onreadystatechange = async () => { | 		document.onreadystatechange = async () => { | ||||||
| 			if (document.readyState == 'complete' && await global.read([`settings`, `behavior`, `autoRun`])) { | 			if (document.readyState == 'complete' && await global.read([`settings`, `behavior`, `autoRun`])) { | ||||||
| 				new logging((new texts(`scrape_msg_ready`)).localized); | 				new logging((new texts(`scrape_msg_ready`)).localized); | ||||||
|  | @ -34,14 +31,14 @@ export default class watch { | ||||||
| 	static main() { | 	static main() { | ||||||
| 		(check.platform()).then((FILTER_RESULT) => { | 		(check.platform()).then((FILTER_RESULT) => { | ||||||
| 			if (FILTER_RESULT && Object.keys(FILTER_RESULT).length > 0) { | 			if (FILTER_RESULT && Object.keys(FILTER_RESULT).length > 0) { | ||||||
|  | 				// Let user know that the website is supported, if ever they have opened the console. 
 | ||||||
|  | 				new logging((new texts(`message_external_supported`)).localized); | ||||||
|  | 
 | ||||||
| 				watch.process(FILTER_RESULT); | 				watch.process(FILTER_RESULT); | ||||||
| 				watch.callGUI(); | 				watch.callGUI(); | ||||||
| 				 | 				 | ||||||
| 				// Create a listener for messages indicating re-processing. 
 | 				// Create a listener for messages indicating re-processing. 
 | ||||||
| 				chrome.runtime.onMessage.addListener(async (message, sender, sendResponse) => { | 				chrome.runtime.onMessage.addListener(async (message, sender, sendResponse) => { | ||||||
| 					// Get the tabId where this content script is running. 
 |  | ||||||
| 					 |  | ||||||
| 
 |  | ||||||
| 					(((typeof message).includes(`obj`) && !Array.isArray(message)) ? message[`refresh`] : false) ? watch.process(FILTER_RESULT) : false; | 					(((typeof message).includes(`obj`) && !Array.isArray(message)) ? message[`refresh`] : false) ? watch.process(FILTER_RESULT) : false; | ||||||
| 				}); | 				}); | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue