move scripts for non-extension pages

This commit is contained in:
buzz-lightsnack-2007 2024-04-15 13:31:39 +08:00
parent 4d20cdec8d
commit 9dfdb3f44b
5 changed files with 5 additions and 6 deletions

21
scripts/external/processor.js vendored Normal file
View file

@ -0,0 +1,21 @@
/* processor.js
Process the information on the website and display it on screen.
*/
// const inject = ((await import(chrome.runtime.getURL("scripts/external/inject.js"))).default);
const scraper = (await import(chrome.runtime.getURL("scripts/external/scraper.js"))).default;
export default class processor {
#filter;
async scrape (fields) {
this.data = new scraper ((fields) ? fields : this.targets);
}
constructor (filter) {
this.#filter = filter;
this.targets = this.#filter[`data`];
this.scrape();
}
}