31 lines
874 B
TypeScript
31 lines
874 B
TypeScript
import translateMain from "./func/translate/translateMain";
|
|
import { Common } from "./common";
|
|
import WuHuTornHelper from "./class/WuhuTornHelper";
|
|
import ZhongIcon from "./class/ZhongIcon";
|
|
import WuhuBase from "./class/WuhuBase";
|
|
import UrlPattern from "./urlMatch";
|
|
import WuhuConfig from "./class/WuhuConfig";
|
|
|
|
(function main() {
|
|
// let started = new Date().getTime();
|
|
let started = performance.now();
|
|
|
|
WuhuBase.conditionInterrupt();
|
|
|
|
let app = new WuHuTornHelper();
|
|
app.init();
|
|
let glob = WuhuBase.glob;
|
|
ZhongIcon.initialize();
|
|
|
|
Common.resolve();
|
|
|
|
UrlPattern.resolve();
|
|
|
|
if (WuhuConfig.get('transEnable')) translateMain(glob.href);
|
|
|
|
// let runTime = new Date().getTime() - started;
|
|
let runTime = (performance.now() - started) | 0;
|
|
ZhongIcon.ZhongNode.initTimer.innerHTML = `助手加载时间 ${ runTime }ms`;
|
|
})
|
|
();
|