Skip to content

Commit

Permalink
7.30
Browse files Browse the repository at this point in the history
tonikelope#262

tonikelope#261


tonikelope#188

DEFAULT FONT -> Roboto

ALTERNATE FONT -> Noto Sans CJK (Use this if you need Chinese Japanese, etc characters support but in Windows7 it might be broken, so EXPORT YOUR SETTINGS BEFORE SETING ALTERNATE FONT)
  • Loading branch information
tonikelope committed Oct 31, 2020
1 parent a654ada commit acfc018
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>7.29</version>
<version>7.30</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/tonikelope/megabasterd/MainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
*/
public final class MainPanel {

public static final String VERSION = "7.29";
public static final String VERSION = "7.30";
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
Expand All @@ -71,7 +71,7 @@ public final class MainPanel {
public static final String DEFAULT_LANGUAGE = "EN";
public static final boolean DEFAULT_SMART_PROXY = false;
public static final double FORCE_GARBAGE_COLLECTION_MAX_MEMORY_PERCENT = 0.7;
public static Font GUI_FONT = createAndRegisterFont("/fonts/NotoSansCJK-Regular.ttc");
public static Font GUI_FONT = createAndRegisterFont("/fonts/Roboto-Regular.ttf");
public static final float ZOOM_FACTOR = 0.8f;
public static final String DEFAULT_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0";
public static final String ICON_FILE = "/images/pica_roja_big.png";
Expand Down Expand Up @@ -658,11 +658,11 @@ public void loadUserSettings() {
if (_font != null) {
if (_font.equals("DEFAULT")) {

GUI_FONT = createAndRegisterFont("/fonts/NotoSansCJK-Regular.ttc");
GUI_FONT = createAndRegisterFont("/fonts/Roboto-Regular.ttf");

} else {

GUI_FONT = createAndRegisterFont("/fonts/Kalam-Light.ttf");
GUI_FONT = createAndRegisterFont("/fonts/NotoSansCJK-Regular.ttc");

}
} else {
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/com/tonikelope/megabasterd/MiscTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -738,12 +738,12 @@ public static String truncateText(String text, int max_length) {

public static String cleanFilename(String filename) {

return (System.getProperty("os.name").toLowerCase().contains("win") ? filename.replaceAll("[<>:\"/\\\\\\|\\?\\*\t]+", "") : filename).replaceAll("\\" + File.separator, "").replaceAll("[\\.]{1,}$", "").trim();
return (System.getProperty("os.name").toLowerCase().contains("win") ? filename.replaceAll("[<>:\"/\\\\\\|\\?\\*\t]+", "") : filename).replaceAll("\\" + File.separator, "").replaceAll("[\\.]{1,}$", "").replaceAll("[\\x00-\\x1F]", "").trim();
}

public static String cleanFilePath(String path) {

return !path.equals(".") ? ((System.getProperty("os.name").toLowerCase().contains("win") ? path.replaceAll("[<>:\"\\|\\?\\*\t]+", "") : path).replaceAll(" +\\" + File.separator, "\\" + File.separator).replaceAll("[\\.]{1,}$", "").trim()) : path;
return !path.equals(".") ? ((System.getProperty("os.name").toLowerCase().contains("win") ? path.replaceAll("[<>:\"\\|\\?\\*\t]+", "") : path).replaceAll(" +\\" + File.separator, "\\" + File.separator).replaceAll("[\\.]{1,}$", "").replaceAll("[\\x00-\\x1F]", "").trim()) : path;
}

public static byte[] genRandomByteArray(int length) {
Expand Down Expand Up @@ -785,9 +785,10 @@ public static String extractMegaLinksFromString(String data) {
String res = "";

if (data != null) {
if (data.startsWith("moz-extension") || data.startsWith("chrome-extension"))

if (data.startsWith("moz-extension") || data.startsWith("chrome-extension")) {
data = extensionURL2NormalLink(data);
}

try {

Expand Down
Binary file removed src/main/resources/fonts/Kalam-Light.ttf
Binary file not shown.
Binary file added src/main/resources/fonts/Roboto-Regular.ttf
Binary file not shown.

0 comments on commit acfc018

Please sign in to comment.