Update lunajspatch.js

This commit is contained in:
恍兮惚兮 2024-03-16 13:40:08 +08:00
parent 3d8d0d319e
commit e8c2998027

View File

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