use a module to check
This commit is contained in:
		
							parent
							
								
									ca30e9dab1
								
							
						
					
					
						commit
						fc5890bb72
					
				
					 1 changed files with 19 additions and 0 deletions
				
			
		
							
								
								
									
										19
									
								
								scripts/external/check.js
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								scripts/external/check.js
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | /* | ||||||
|  | check.js | ||||||
|  | 
 | ||||||
|  | Check if a website is supported.  | ||||||
|  | */ | ||||||
|  | 
 | ||||||
|  | import filters from '/scripts/filters.js'; | ||||||
|  | 
 | ||||||
|  | export default class check { | ||||||
|  |      /*  | ||||||
|  |      Check if an e-commerce platform is supported.  | ||||||
|  | 
 | ||||||
|  |      @param {string} URL | ||||||
|  |      @returns {object} the support state | ||||||
|  |      */ | ||||||
|  |      static async platform (URL = window.location.href) { | ||||||
|  |           return (await ((new filters).select(URL))); | ||||||
|  |      } | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue