only read data if auto run is enabled
This commit is contained in:
		
							parent
							
								
									72733aa21b
								
							
						
					
					
						commit
						b61100af02
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		
							
								
								
									
										10
									
								
								scripts/external/watch.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								scripts/external/watch.js
									
										
									
									
										vendored
									
									
								
							|  | @ -6,7 +6,7 @@ import check from "/scripts/external/check.js"; | ||||||
| import processor from "/scripts/external/processor.js"; | import processor from "/scripts/external/processor.js"; | ||||||
| import logging from "/scripts/logging.js"; | import logging from "/scripts/logging.js"; | ||||||
| import texts from "/scripts/mapping/read.js"; | import texts from "/scripts/mapping/read.js"; | ||||||
| import {read} from "/scripts/secretariat.js"; | import {global} from "/scripts/secretariat.js"; | ||||||
| 
 | 
 | ||||||
| export default class watch { | export default class watch { | ||||||
| 	/* Open relevant graphical user interfaces.  | 	/* Open relevant graphical user interfaces.  | ||||||
|  | @ -19,13 +19,13 @@ export default class watch { | ||||||
| 
 | 
 | ||||||
| 	@param {dictionary} filter the filter to work with | 	@param {dictionary} filter the filter to work with | ||||||
| 	*/ | 	*/ | ||||||
| 	static process(filter) { | 	static async process(filter) { | ||||||
| 		// Let user know that the website is supported, if ever they have opened the console. 
 | 		// Let user know that the website is supported, if ever they have opened the console. 
 | ||||||
| 		new logging((new texts(`message_external_supported`)).localized); | 		new logging((new texts(`message_external_supported`)).localized); | ||||||
| 
 | 
 | ||||||
| 		// Begin only when the page is fully loaded. 
 | 		document.onreadystatechange = async () => { | ||||||
| 		document.onreadystatechange = () => { | 			if (document.readyState == 'complete' && await global.read([`settings`, `behavior`, `autoRun`])) { | ||||||
| 			if (document.readyState == 'complete') { | 				console.log(`Loading complete, processing…`); | ||||||
| 				let PROC = new processor(filter); | 				let PROC = new processor(filter); | ||||||
| 			} | 			} | ||||||
| 		}; | 		}; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue