Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed Apr 30, 2024
1 parent 2de000d commit df9d229
Show file tree
Hide file tree
Showing 2 changed files with 244 additions and 257 deletions.
23 changes: 7 additions & 16 deletions src/knife/CopyJsOfThisSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -93,21 +92,13 @@ public String findUrls(IHttpRequestResponse message){


String siteBaseUrl = null;
if (current_fullUrl != null) {
try {
siteBaseUrl = new UrlUtils(current_referUrl).getBaseURL();
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
if (siteBaseUrl == null) {
try {
siteBaseUrl = new UrlUtils(current_fullUrl).getBaseURL();
} catch (MalformedURLException e) {
e.printStackTrace();
}
}

if (current_fullUrl != null) {
siteBaseUrl = UrlUtils.getBaseUrl(current_referUrl);
}
if (siteBaseUrl == null) {
siteBaseUrl = UrlUtils.getBaseUrl(current_fullUrl);
}

if (StringUtils.isEmpty(siteBaseUrl)){
return "";
}
Expand Down
Loading

0 comments on commit df9d229

Please sign in to comment.