rename references of filter class
This commit is contained in:
		
							parent
							
								
									98b01c8380
								
							
						
					
					
						commit
						88f364137c
					
				
					 3 changed files with 47 additions and 45 deletions
				
			
		|  | @ -5,7 +5,7 @@ Check the tabs in the background, and check the filters. | ||||||
| 
 | 
 | ||||||
| // Filter importation
 | // Filter importation
 | ||||||
| import EntryManager from "/scripts/GUI/entrypoints/manager.js" | import EntryManager from "/scripts/GUI/entrypoints/manager.js" | ||||||
| import filters from "../filters.js"; | import FilterManager from "../filters.js"; | ||||||
| import {background, global} from "/scripts/secretariat.js"; | import {background, global} from "/scripts/secretariat.js"; | ||||||
| 
 | 
 | ||||||
| export default class BackgroundCheck { | export default class BackgroundCheck { | ||||||
|  | @ -85,11 +85,13 @@ export default class BackgroundCheck { | ||||||
| 					const updater_background = () => { | 					const updater_background = () => { | ||||||
| 						this.update[`background`] = async () => { | 						this.update[`background`] = async () => { | ||||||
| 							if ((await global.read([`settings`, `sync`, `duration`])) ? (await global.read([`settings`, `sync`, `duration`] * (60 ** 2) * 1000 != DURATION_PREFERENCES[`duration`])) : false) { | 							if ((await global.read([`settings`, `sync`, `duration`])) ? (await global.read([`settings`, `sync`, `duration`] * (60 ** 2) * 1000 != DURATION_PREFERENCES[`duration`])) : false) { | ||||||
| 								// Get the new time. 
 | 								if (await global.global.read([`settings`, `sync`, `duration`])) { | ||||||
| 								DURATION_PREFERENCES[`duration`] = await global.global.read([`settings`, `sync`, `duration`]) * (60 ** 2) * 1000; | 									// Get the new time.
 | ||||||
|  | 									DURATION_PREFERENCES[`duration`] = await global.global.read([`settings`, `sync`, `duration`]) * (60 ** 2) * 1000; | ||||||
| 
 | 
 | ||||||
| 								// Reset the updater.
 | 									// Reset the updater.
 | ||||||
| 								updater_reset();								 | 									updater_reset(); | ||||||
|  | 								} | ||||||
| 							}; | 							}; | ||||||
| 						}; | 						}; | ||||||
| 
 | 
 | ||||||
|  | @ -101,7 +103,7 @@ export default class BackgroundCheck { | ||||||
| 					DURATION_PREFERENCES[`duration`] = DURATION_PREFERENCES[`duration`] * (60 ** 2) * 1000; | 					DURATION_PREFERENCES[`duration`] = DURATION_PREFERENCES[`duration`] * (60 ** 2) * 1000; | ||||||
| 
 | 
 | ||||||
| 					// Set the filter management.
 | 					// Set the filter management.
 | ||||||
| 					let filter = new filters(); | 					let filter = new FilterManager(); | ||||||
| 
 | 
 | ||||||
| 					// When the browser is started, run the updater immediately only when the filters are not updated yet.
 | 					// When the browser is started, run the updater immediately only when the filters are not updated yet.
 | ||||||
| 					(updater_check()) | 					(updater_check()) | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ | ||||||
| import {global} from "/scripts/secretariat.js"; | import {global} from "/scripts/secretariat.js"; | ||||||
| import Page from "/scripts/pages/page.js"; | import Page from "/scripts/pages/page.js"; | ||||||
| import texts from "/scripts/mapping/read.js"; | import texts from "/scripts/mapping/read.js"; | ||||||
| import filters from "/scripts/filters.js"; | import FilterManager from "/scripts/filters.js"; | ||||||
| import logging from "/scripts/logging.js"; | import logging from "/scripts/logging.js"; | ||||||
| import {URLs} from "/scripts/utils/URLs.js"; | import {URLs} from "/scripts/utils/URLs.js"; | ||||||
| 
 | 
 | ||||||
|  | @ -26,7 +26,7 @@ class Page_Settings extends Page { | ||||||
| 	events() { | 	events() { | ||||||
| 		if ((Object.keys(this.window.elements[`interactive`][`action`])).length) { | 		if ((Object.keys(this.window.elements[`interactive`][`action`])).length) { | ||||||
| 			// Instantiate the filters module, since it's needed for some of the actions below.
 | 			// Instantiate the filters module, since it's needed for some of the actions below.
 | ||||||
| 			this.data.filters = (this.data.filters) ? this.data.filters : new filters(); | 			this.data.filters = (this.data.filters) ? this.data.filters : new FilterManager(); | ||||||
| 
 | 
 | ||||||
| 			// Bypass the OOBE page since the user opened the settings page.
 | 			// Bypass the OOBE page since the user opened the settings page.
 | ||||||
| 			global.write([`init`], true, 1, {"silent": true}); | 			global.write([`init`], true, 1, {"silent": true}); | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ check.js | ||||||
| Check if a website is supported. | Check if a website is supported. | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| import filters from '/scripts/filters.js'; | import FilterManager from '/scripts/filters.js'; | ||||||
| 
 | 
 | ||||||
| export default class check { | export default class check { | ||||||
|      /* |      /* | ||||||
|  | @ -14,6 +14,6 @@ export default class check { | ||||||
|      @returns {object} the support state |      @returns {object} the support state | ||||||
|      */ |      */ | ||||||
|      static async platform (URL = window.location.href) { |      static async platform (URL = window.location.href) { | ||||||
|           return (await ((new filters).select(URL))); |           return (await ((new FilterManager).select(URL))); | ||||||
|      } |      } | ||||||
| } | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue