Skip to content

Commit

Permalink
Apply PR
Browse files Browse the repository at this point in the history
Merge pull request #15 from yf-dev:master
Update emoticon url version
  • Loading branch information
krynen committed Jun 24, 2021
2 parents 0c6b751 + 5a2c360 commit 75d5b11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/browserified.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ else {

/* 디씨콘 및 구독콘 로드 및 적용 */
if (configData.loadTwitchCons) {
var twitchConsUrlTemplate = "https://static-cdn.jtvnw.net/emoticons/v1/";
var twitchConsUrlTemplate = "https://static-cdn.jtvnw.net/emoticons/v2/";

applyTwitchCon = function(message, data) {
if ( !(data && data.emotes) || (data.emotes.length==0) ) { return message; }
Expand All @@ -684,7 +684,7 @@ if (configData.loadTwitchCons) {
")(\\s|$)"
);
var emoteElement =
'<img class="twitch_emote" src="' + twitchConsUrlTemplate + emotes[emote] + '/3.0" />';
'<img class="twitch_emote" src="' + twitchConsUrlTemplate + emotes[emote] + '/default/light/3.0" />';

while (message.match(emoteRegExp)) {
message = message.replace(emoteRegExp, "$1" + emoteElement + "$3");
Expand Down
4 changes: 2 additions & 2 deletions source/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ else {

/* 디씨콘 및 구독콘 로드 및 적용 */
if (configData.loadTwitchCons) {
var twitchConsUrlTemplate = "https://static-cdn.jtvnw.net/emoticons/v1/";
var twitchConsUrlTemplate = "https://static-cdn.jtvnw.net/emoticons/v2/";

applyTwitchCon = function(message, data) {
if ( !(data && data.emotes) || (data.emotes.length==0) ) { return message; }
Expand All @@ -653,7 +653,7 @@ if (configData.loadTwitchCons) {
")(\\s|$)"
);
var emoteElement =
'<img class="twitch_emote" src="' + twitchConsUrlTemplate + emotes[emote] + '/3.0" />';
'<img class="twitch_emote" src="' + twitchConsUrlTemplate + emotes[emote] + '/default/light/3.0" />';

while (message.match(emoteRegExp)) {
message = message.replace(emoteRegExp, "$1" + emoteElement + "$3");
Expand Down

0 comments on commit 75d5b11

Please sign in to comment.