Update lunajspatch.js

This commit is contained in:
恍兮惚兮 2024-03-16 13:20:45 +08:00
parent 5ea4fee22f
commit 3d8d0d319e

View File

@ -34,19 +34,16 @@ function Electronhook() {
}
function retryinject(times){
if(times==0)return;
try{
if(window.tyrano && tyrano.plugin){
Electronhook();
}
else if(window.Utils && Utils.RPGMAKER_NAME){
NWjshook();
}
else{
setTimeout(retryinject,3000,times-1);
}
if(window && window.tyrano && tyrano.plugin){
Electronhook();
}
catch{
//非主线程甚至没有window对象会弹窗报错
else if(window && window.Utils && Utils.RPGMAKER_NAME){
NWjshook();
}
else{
setTimeout(retryinject,3000,times-1);
}
}
setTimeout(retryinject,3000,3);