auto-updated syntax formatting
This commit is contained in:
		
							parent
							
								
									481ef03576
								
							
						
					
					
						commit
						5b06c3f967
					
				
					 1 changed files with 62 additions and 59 deletions
				
			
		|  | @ -1,59 +1,62 @@ | ||||||
| /* Watchman.js | /* Watchman.js | ||||||
| Be sensitive to changes and update the state. | Be sensitive to changes and update the state. | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| (async () => { | (async () => { | ||||||
|     // Import modules.
 |   // Import modules.
 | ||||||
|     let secretariat = await import(chrome.runtime.getURL("scripts/secretariat.js")); |   let secretariat = await import( | ||||||
|     let reader = await import(chrome.runtime.getURL("scripts/reader.js")); |     chrome.runtime.getURL("scripts/secretariat.js") | ||||||
| 
 |   ); | ||||||
|     class watchman { |   let filters = await import(chrome.runtime.getURL("scripts/filters.js")); | ||||||
|       /* Check the current URL. |   let reader = await import(chrome.runtime.getURL("scripts/reader.js")); | ||||||
| 
 | 
 | ||||||
|       @param {string} URL the page URL; default value is the current webpage |   class watchman { | ||||||
|       @return {dictionary} the filter to follow |     /* Check the current URL. | ||||||
|       */ | 
 | ||||||
|         static observe(URL = window.location.href) { |       @param {string} URL the page URL; default value is the current webpage | ||||||
| 
 |       @return {dictionary} the filter to follow | ||||||
|             // Create the variable to determine the corresponding key.
 |       */ | ||||||
|             let activity = false; |     static observe(URL = window.location.href) { | ||||||
|             let filters = secretariat.specifics(`filters`, URL); |       // Create the variable to determine the corresponding key.
 | ||||||
| 
 |       let activity = false; | ||||||
|             // Check if the filters exist.
 |       // let filters = secretariat.specifics(`filters`, URL);
 | ||||||
|             activity = (filters); | 
 | ||||||
| 
 |       // Check if the filters exist.
 | ||||||
|             return (activity); |       activity = filters; | ||||||
|         }; | 
 | ||||||
| 
 |       return activity; | ||||||
|         /* Act on the page. |     } | ||||||
| 
 | 
 | ||||||
|         @param {dictionary} filters the filter to work with |     /* Act on the page. | ||||||
|         @return {boolean} the state | 
 | ||||||
|         */ |         @param {dictionary} filters the filter to work with | ||||||
|         static act(filters) { |         @return {boolean} the state | ||||||
| 
 |         */ | ||||||
|             console.log("ShopAI works here! Click on the button in the toolbar or website to start."); |     static act(filters) { | ||||||
|             // TODO
 |       console.log( | ||||||
|         } |         "ShopAI works here! Click on the button in the toolbar or website to start.", | ||||||
| 
 |       ); | ||||||
|         /* Set the program to standby utnil next load. |       // TODO
 | ||||||
|         */ |     } | ||||||
|         static standby() { | 
 | ||||||
| 
 |     /* Set the program to standby utnil next load. | ||||||
|           console.log("ShopAI doesn't work here (yet). Expecting something? Try checking your filters. If you know what you're doing, feel free to create a filter yourself."); |      */ | ||||||
|         } |     static standby() { | ||||||
| 
 |       console.log( | ||||||
|         static job() { |         "ShopAI doesn't work here (yet). Expecting something? Try checking your filters. If you know what you're doing, feel free to create a filter yourself.", | ||||||
|           /* The main action. */ |       ); | ||||||
|           let job_task = watchman.observe(); |     } | ||||||
|           if (job_task) { | 
 | ||||||
|             watchman.act(job_task); |     static job() { | ||||||
|           } else { |       /* The main action. */ | ||||||
|             watchman.standby(); |       let job_task = watchman.observe(); | ||||||
|           } |       if (job_task) { | ||||||
|         } |         watchman.act(job_task); | ||||||
|     } |       } else { | ||||||
| 
 |         watchman.standby(); | ||||||
|     watchman.job(); |       } | ||||||
| 
 |     } | ||||||
| })(); |   } | ||||||
|  | 
 | ||||||
|  |   watchman.job(); | ||||||
|  | })(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue