modify entry func

This commit is contained in:
Gabe Yuan
2023-08-10 13:41:55 +08:00
parent 54ab126c64
commit 0616b4f221
3 changed files with 7 additions and 10 deletions

View File

@@ -9,6 +9,7 @@ import {
import { StoragesProvider } from "../hooks/Storage";
import { queryEls } from ".";
import Content from "../views/Content";
import { fetchUpdate } from "./fetch";
/**
* 翻译类
@@ -44,7 +45,8 @@ export class Translator {
});
});
constructor(rule) {
constructor(rule, { fetchInterval, fetchLimit }) {
fetchUpdate(fetchInterval, fetchLimit);
this.rule = rule;
if (rule.transOpen === "true") {
this._register();