mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-29 17:22:44 +08:00
♻️ 修改 onPluginEnter 执行时机.
This commit is contained in:
parent
7fb299d270
commit
2a1a332fbb
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rubick",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.6",
|
||||
"author": "muwoo <2424880409@qq.com>",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user