Skip to content

Commit 36431a8

Browse files
committed
Set tab focus on install
1 parent 167f7d5 commit 36431a8

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/main/kotlin/ExtensionReflect.kt

+14-3
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,32 @@ import org.parosproxy.paros.network.HttpSender
66

77
class ExtensionReflect : ExtensionAdaptor(NAME) {
88

9+
val reflectPanel = ReflectPanel()
10+
911
companion object {
1012
const val NAME = "Reflect"
1113
}
1214

1315
override fun hook(extensionHook: ExtensionHook?) {
1416
super.hook(extensionHook)
15-
val reflectPanel = ReflectPanel()
16-
HttpSender.addListener(ReflectListener(reflectPanel))
17-
extensionHook?.hookView?.addWorkPanel(reflectPanel)
17+
if (view != null) {
18+
HttpSender.addListener(ReflectListener(reflectPanel))
19+
extensionHook?.hookView?.addWorkPanel(reflectPanel)
20+
}
1821
}
1922

2023
override fun canUnload(): Boolean = true
2124

2225
override fun getAuthor(): String = "Caleb Kinney"
2326

2427
override fun getDescription(): String = "Finds reflected parameters."
28+
29+
override fun postInstall() {
30+
super.postInstall()
31+
32+
if (view != null) {
33+
reflectPanel.setTabFocus()
34+
}
35+
}
2536
}
2637

0 commit comments

Comments
 (0)