Skip to content

Commit

Permalink
0.5.2 (hotfix)
Browse files Browse the repository at this point in the history
1 error modification
  • Loading branch information
krynen committed Apr 21, 2020
1 parent d6341f9 commit d0cd03f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
19 changes: 10 additions & 9 deletions lib/browserified.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,15 +794,16 @@ var client = (function() {
// 링크 파싱
var linkRegExp = /^(https?:\/\/)?([A-Za-z0-9#%\-_=+]+\.)+[A-Za-z]{2,}(\/[^\s]*)?$/;
message.split(/\s/).forEach( function(phrase) {
if (
((configData.clipReplaceMsg||"").length>0) &&
phrase.match(linkRegExp) &&
(phrase.indexOf("twitch")>=0) && (phrase.indexOf("clip")>=0)
) {
message = message.replace(phrase, configData.clipReplaceMsg);
}
else if ((configData.linkReplaceMsg||"").length>0) {
message = message.replace(phrase, configData.linkReplaceMsg);
if (phrase.match(linkRegExp)) {
if (
((configData.clipReplaceMsg||"").length>0) &&
(phrase.indexOf("twitch")>=0) && (phrase.indexOf("clip")>=0)
) {
message = message.replace(phrase, configData.clipReplaceMsg);
}
else if ((configData.linkReplaceMsg||"").length>0) {
message = message.replace(phrase, configData.linkReplaceMsg);
}
}
} );

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
********************** 패 치 노 트 **********************
* *
* ********************************************** *
* * 0.5.1 : 21th Apr 2020 * *
* * 0.5.2 : 21th Apr 2020 * *
* ********************************************** *
* HOTFIX 0.5.1 -> 0.5.2 *
* - 모든 메세지가 링크로 인식되어 변환되는 문제를 수정 *
* *
* 추가 및 개선된 기능 *
* - 클립 링크 대체 방식 변경 및 일반 링크 대체 기능 추가 *
* linkReplaceMsg 설정 추가 *
Expand Down
19 changes: 10 additions & 9 deletions source/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -763,15 +763,16 @@ var client = (function() {
// 링크 파싱
var linkRegExp = /^(https?:\/\/)?([A-Za-z0-9#%\-_=+]+\.)+[A-Za-z]{2,}(\/[^\s]*)?$/;
message.split(/\s/).forEach( function(phrase) {
if (
((configData.clipReplaceMsg||"").length>0) &&
phrase.match(linkRegExp) &&
(phrase.indexOf("twitch")>=0) && (phrase.indexOf("clip")>=0)
) {
message = message.replace(phrase, configData.clipReplaceMsg);
}
else if ((configData.linkReplaceMsg||"").length>0) {
message = message.replace(phrase, configData.linkReplaceMsg);
if (phrase.match(linkRegExp)) {
if (
((configData.clipReplaceMsg||"").length>0) &&
(phrase.indexOf("twitch")>=0) && (phrase.indexOf("clip")>=0)
) {
message = message.replace(phrase, configData.clipReplaceMsg);
}
else if ((configData.linkReplaceMsg||"").length>0) {
message = message.replace(phrase, configData.linkReplaceMsg);
}
}
} );

Expand Down

0 comments on commit d0cd03f

Please sign in to comment.