Skip to content

Commit

Permalink
Change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Chipppppppppp committed Jun 8, 2024
1 parent 8f74211 commit b7ad79e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b7ad79e

Please sign in to comment.