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

View file

@ -2,15 +2,14 @@
Process the information on the website and display it on screen.
*/
// const inject = ((await import(chrome.runtime.getURL("scripts/outside/inject.js"))).default);
const scraper = (await import(chrome.runtime.getURL("scripts/outside/scraper.js"))).default;
// 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);
console.log(this.data);
}
constructor (filter) {

View file

@ -5,7 +5,7 @@ Be sensitive to changes and update the state.
let main = (async () => {
// Import modules.
let filters = new ((await import(chrome.runtime.getURL("scripts/filters.js"))).default);
const processor = (await import(chrome.runtime.getURL("scripts/outside/processor.js"))).default;
const processor = (await import(chrome.runtime.getURL("scripts/external/processor.js"))).default;
class watchman {
/* Check the current URL.