♻️ 修改 onPluginEnter 执行时机.

This commit is contained in:
muwoo 2023-10-20 11:23:57 +08:00
parent 7fb299d270
commit 2a1a332fbb
2 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "rubick",
"version": "4.0.5",
"version": "4.0.6",
"author": "muwoo <2424880409@qq.com>",
"private": true,
"scripts": {

View File

@ -175,6 +175,7 @@ export default () => {
const getView = () => view;
const executeHooks = (hook, data) => {
setTimeout(() => {
if (!view) return;
const evalJs = `if(window.rubick && window.rubick.hooks && typeof window.rubick.hooks.on${hook} === 'function' ) {
try {
@ -183,6 +184,7 @@ export default () => {
}
`;
view.webContents?.executeJavaScript(evalJs);
}, 300);
};
return {