diff --git a/src/messageTab/U2C/ChinesePanel.java b/src/messageTab/U2C/ChinesePanel.java index 2a697cd..2d4bb53 100644 --- a/src/messageTab/U2C/ChinesePanel.java +++ b/src/messageTab/U2C/ChinesePanel.java @@ -264,9 +264,12 @@ public void display(byte[] content, boolean isRequest, String currentCharset) { if (getter.isJSON(content, isRequest)) { textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JSON); + } else if (getter.isJavaScript(content, isRequest)){ + textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT); } else { textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_HTML); } + try { textArea.setText(new String(newContent, currentCharset)); } catch (UnsupportedEncodingException e) {