use a module to check

This commit is contained in:
buzz-lightsnack-2007 2024-04-26 22:54:35 +08:00
parent ca30e9dab1
commit fc5890bb72

19
scripts/external/check.js vendored Normal file
View 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)));
}
}