diff --git a/package.json b/package.json index f0e953d..b10a96c 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,13 @@ ], "globals": { "GM": true - } + }, + "no-eval": [ + "error", + { + "allowIndirect": true + } + ] }, "browserslist": { "production": [ diff --git a/src/userscript.js b/src/userscript.js index 1004231..a2f1d64 100644 --- a/src/userscript.js +++ b/src/userscript.js @@ -9,7 +9,7 @@ import { trySyncAllSubRules } from "./libs/rules"; import { isGm } from "./libs/browser"; import { MSG_TRANS_TOGGLE, MSG_TRANS_PUTRULE } from "./config"; import { isIframe } from "./libs/iframe"; -import { genEventName, handlePing, injectScript } from "./libs/gm"; +import { handlePing, injectScript } from "./libs/gm"; /** * 入口函数