From 0729da39f3c250f83c3878fd42fef2a54e8edb04 Mon Sep 17 00:00:00 2001 From: Konloch Date: Wed, 21 Jul 2021 06:22:22 -0700 Subject: [PATCH] JS API Update Build the plugin console inside of the execute function. This allows the tab name to update correctly based on the resource being processed. (It will fallback without correct tab names if not) --- plugins/example/ExampleStringDecrypter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/example/ExampleStringDecrypter.js b/plugins/example/ExampleStringDecrypter.js index a60ed8d8..d038673e 100644 --- a/plugins/example/ExampleStringDecrypter.js +++ b/plugins/example/ExampleStringDecrypter.js @@ -10,10 +10,12 @@ var dialogue = new MultipleChoiceDialogue("Bytecode Viewer - WARNING", "WARNING: This will load the classes into the JVM and execute the initialize function" + "\nfor each class. IF THE FILE YOU'RE LOADING IS MALICIOUS, DO NOT CONTINUE.", ["Continue", "Cancel"]); -var gui = new PluginConsole("Skeleton"); +var gui; function execute(classNodeList) { + gui = new PluginConsole("Skeleton"); + if(dialogue.promptChoice() == 0) { var needsWarning = false;