correct function name

This commit is contained in:
Gabe Yuan
2023-10-12 17:00:18 +08:00
parent b13a63e568
commit 7173692db7
3 changed files with 5 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ import {
getFabWithDefault, getFabWithDefault,
} from "./libs/storage"; } from "./libs/storage";
import { Translator } from "./libs/translator"; import { Translator } from "./libs/translator";
import { isIframe, sendIframeMsg, sendPrentMsg } from "./libs/iframe"; import { isIframe, sendIframeMsg, sendParentMsg } from "./libs/iframe";
import { matchRule } from "./libs/rules"; import { matchRule } from "./libs/rules";
import { webfix } from "./libs/webfix"; import { webfix } from "./libs/webfix";
@@ -48,7 +48,7 @@ const init = async () => {
default: default:
} }
}); });
sendPrentMsg(MSG_TRANS_GETRULE); sendParentMsg(MSG_TRANS_GETRULE);
return; return;
} }

View File

@@ -6,6 +6,6 @@ export const sendIframeMsg = (action, args) => {
}); });
}; };
export const sendPrentMsg = (action, args) => { export const sendParentMsg = (action, args) => {
window.parent.postMessage({ action, args }, "*"); window.parent.postMessage({ action, args }, "*");
}; };

View File

@@ -17,7 +17,7 @@ import {
MSG_TRANS_PUTRULE, MSG_TRANS_PUTRULE,
APP_LCNAME, APP_LCNAME,
} from "./config"; } from "./config";
import { isIframe, sendIframeMsg, sendPrentMsg } from "./libs/iframe"; import { isIframe, sendIframeMsg, sendParentMsg } from "./libs/iframe";
import { handlePing, injectScript } from "./libs/gm"; import { handlePing, injectScript } from "./libs/gm";
import { matchRule } from "./libs/rules"; import { matchRule } from "./libs/rules";
import { genEventName } from "./libs/utils"; import { genEventName } from "./libs/utils";
@@ -75,7 +75,7 @@ const init = async () => {
default: default:
} }
}); });
sendPrentMsg(MSG_TRANS_GETRULE); sendParentMsg(MSG_TRANS_GETRULE);
return; return;
} }