Skip to content

Commit

Permalink
Update ToolPanel.java
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed Jul 12, 2024
1 parent 4cd4498 commit 8ea0abe
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Tools/ToolPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,19 @@ protected void action() {
}
}
};

JButton btnGetRootDomain = new BackGroundButton("Get Root Domain") {
@Override
protected void action() {
List<String> lines = SwingUtils.getLinesFromTextArea(inputTextArea);
List<String> result = new ArrayList<>();
for (String line:lines) {
String rootDomain = DomainUtils.getRootDomain(line);
result.add(rootDomain);
}
outputTextArea.setText(String.join(System.lineSeparator(), result));
}
};


JButton btnFindUrls = new BackGroundButton("Find URL") {
Expand Down Expand Up @@ -1502,6 +1515,7 @@ protected void action() {
cloumnIndex = 0;
buttonPanel.add(btnFindDomains, new bagLayout(++rowIndex, ++cloumnIndex));
buttonPanel.add(btnFindDomainsNoPort, new bagLayout(rowIndex, ++cloumnIndex));
buttonPanel.add(btnGetRootDomain, new bagLayout(rowIndex, ++cloumnIndex));

cloumnIndex = 0;
buttonPanel.add(btnFindUrls, new bagLayout(++rowIndex, ++cloumnIndex));
Expand Down

0 comments on commit 8ea0abe

Please sign in to comment.