From b7ad79e899b6963f71d11ce170f1e1c92d14aa7f Mon Sep 17 00:00:00 2001 From: Chippppp <78024852+Chipppppppppp@users.noreply.github.com> Date: Sat, 8 Jun 2024 22:38:11 +0900 Subject: [PATCH] Change variable name --- .../io/github/chipppppppppp/lime/hooks/ModifyRequest.java | 4 ++-- .../io/github/chipppppppppp/lime/hooks/ModifyResponse.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyRequest.java b/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyRequest.java index 94c45db8..3d04b55b 100644 --- a/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyRequest.java +++ b/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyRequest.java @@ -26,8 +26,8 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { ctx.setOptimizationLevel(-1); try { Scriptable scope = ctx.initStandardObjects(); - Object jsCommunication = Context.javaToJS(new Communication(Communication.Type.REQUEST, param.args[0].toString(), param.args[1]), scope); - ScriptableObject.putProperty(scope, "communication", jsCommunication); + Object jsData = Context.javaToJS(new Communication(Communication.Type.REQUEST, param.args[0].toString(), param.args[1]), scope); + ScriptableObject.putProperty(scope, "data", jsData); ScriptableObject.putProperty(scope, "console", Context.javaToJS(new Console(), scope)); ctx.evaluateString(scope, script, "Script", 1, null); } catch (Exception e) { diff --git a/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyResponse.java b/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyResponse.java index 414239e9..23878a3f 100644 --- a/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyResponse.java +++ b/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyResponse.java @@ -26,8 +26,8 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { ctx.setOptimizationLevel(-1); try { Scriptable scope = ctx.initStandardObjects(); - Object jsCommunication = Context.javaToJS(new Communication(Communication.Type.RESPONSE, param.args[0].toString(), param.args[1]), scope); - ScriptableObject.putProperty(scope, "communication", jsCommunication); + Object jsData = Context.javaToJS(new Communication(Communication.Type.RESPONSE, param.args[0].toString(), param.args[1]), scope); + ScriptableObject.putProperty(scope, "data", jsData); ScriptableObject.putProperty(scope, "console", Context.javaToJS(new Console(), scope)); ctx.evaluateString(scope, script, "Script", 1, null); } catch (Exception e) {