Skip to content

Commit

Permalink
0.5.4
Browse files Browse the repository at this point in the history
wrap up PR (1 error modification)
additional 1 error modification
1 minor change
  • Loading branch information
krynen committed Nov 13, 2020
1 parent a15229f commit 8f8fc50
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
7 changes: 6 additions & 1 deletion lib/browserified.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,19 @@ addChatMessage = function(nick, message, data) {

var targets = Object.keys(badgeList||{})
.filter( function(name) { return (name.indexOf(badgeName + "/") == 0); } )
.filter( function(name) { return Number(name.split("/")[1]) <= badgeTier; } )
.filter( function(name) {
if (!isNaN(badgeTier)) { return Number(name.split("/")[1]) <= badgeTier; }
return (name.indexOf(badgeTier) == badgeName.length+1);
} )
.sort( function(right, left) {
return Number(left.split("/")[1]) - Number(right.split("/")[1]);
} );

if (targets.length > 0) {
var chatBadge = document.createElement("img");
chatBadge.src = badgeList[targets[0]];
chatBadge.classList.add("badge_" + badgeName);
chatBadge.classList.add("badge_" + badge);
chatBadgeBox.appendChild(chatBadge);
}
} );
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
"IRC"
],
"bugs": {
"url": "https://github.com/krynen/BridgeBBCC"
"url": "https://github.com/krynen/BridgeBBCC/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/krynen/BridgeBBCC.git"
},
"license": "MIT",
"author": "Mr_WaterT",
Expand Down
9 changes: 8 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
********************** 패 치 노 트 **********************
* *
* ********************************************** *
* * 0.5.4 : From 10th May 2020 ... * *
* * 0.5.4 : 14th November 2020 * *
* ********************************************** *
* 오류 수정 및 변경된 기능 *
* - URL로부터 scale 설정이 불러와지지 않던 문제 수정 *
* *
* - 새로 생긴 뱃지가 표시되지 않던 문제 수정 *
* 예측 기능과 함께 생긴 prediction 뱃지가 표시 *
* *
* *
* 적용 예정이 없는 부분 *
* - 일부 후원 아이콘 표시 *
Expand All @@ -36,6 +39,10 @@
* *
* - 채널 포인트로 메세지 강조 *
* *
* 개발자를 위한 메세지 *
* - 뱃지 이미지 .chat_badge_box > img에 클래스가 추가됨 *
* .badge_BADGENAME.badge_BADGENAME/BADGETIER *
* *
* *
********************** config.js 설정 **********************
* *
Expand Down
7 changes: 6 additions & 1 deletion source/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,19 @@ addChatMessage = function(nick, message, data) {

var targets = Object.keys(badgeList||{})
.filter( function(name) { return (name.indexOf(badgeName + "/") == 0); } )
.filter( function(name) { return Number(name.split("/")[1]) <= badgeTier; } )
.filter( function(name) {
if (!isNaN(badgeTier)) { return Number(name.split("/")[1]) <= badgeTier; }
return (name.indexOf(badgeTier) == badgeName.length+1);
} )
.sort( function(right, left) {
return Number(left.split("/")[1]) - Number(right.split("/")[1]);
} );

if (targets.length > 0) {
var chatBadge = document.createElement("img");
chatBadge.src = badgeList[targets[0]];
chatBadge.classList.add("badge_" + badgeName);
chatBadge.classList.add("badge_" + badge);
chatBadgeBox.appendChild(chatBadge);
}
} );
Expand Down

0 comments on commit 8f8fc50

Please sign in to comment.