Skip to content

Commit

Permalink
読み上げが正常動作しないバグを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
advancedbear committed May 30, 2021
1 parent 6f527f5 commit 6bd23ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,15 +311,21 @@ function isEnglish(message){
function deleteEmote(message) {
let emotes = Object.keys(JSON.parse(localStorage.replaceListEmote));
for(emote of emotes){
message = message.replace(new RegExp(emote, 'g'), '');
_emote = emote.replace("\\", '\\\\').replace('(', '\\(').replace(')', '\\)').replace('[', '\\[').replace(']', '\\]')
.replace('+', '\\+').replace('.', '\\.').replace('?', '\\?').replace('{','\\{').replace('}','\\}').replace('*','\\*')
.replace('^', '\\^').replace('$', '\\$').replace('-', '\\-').replace('|', '\\|')
message = message.replace(new RegExp(_emote, 'g'), '');
}
return message;
}

function replaceMessage(message, rList) {
let nMessage = message;
for(rKey in rList){
nMessage = nMessage.replace(new RegExp(rKey, 'g'), rList[rKey]);
_rKey = rKey.replace("\\", '\\\\').replace('(', '\\(').replace(')', '\\)').replace('[', '\\[').replace(']', '\\]')
.replace('+', '\\+').replace('.', '\\.').replace('?', '\\?').replace('{','\\{').replace('}','\\}').replace('*','\\*')
.replace('^', '\\^').replace('$', '\\$').replace('-', '\\-').replace('|', '\\|')
nMessage = nMessage.replace(new RegExp(_rKey, 'g'), rList[rKey]);
}
return nMessage;
}
Expand Down
8 changes: 4 additions & 4 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"materialize-css": "^1.0.0-rc.2",
"node-webkit-updater": "^0.3.3",
"say": "^0.15.0",
"tmi.js": "^1.2.1"
"tmi.js": "^1.8.3"
},
"description": "\u3010Update: 2020/02/16\u3011\n\u30fb\u521d\u56de\u8d77\u52d5\u3001\u8a2d\u5b9a\u521d\u671f\u5316\u5f8c\u306b\u8aad\u307f\u4e0a\u3052\u3067\u304d\u306a\u3044\u4e0d\u5177\u5408\u3092\u4fee\u6b63\n\n\u3010\u304a\u77e5\u3089\u305b\u3011\n\u4f5c\u8005Twitter\uff08@advanced_bear\uff09\u306e\u56fa\u5b9a\u30c4\u30a4\u30fc\u30c8\u306b\u63b2\u8f09\u306e\u753b\u50cf\u3068URL\u3092\u3001\u7686\u69d8\u306e\u914d\u4fe1\u30b5\u30a4\u30c8\u7b49\u3067\u5ba3\u4f1d\u3044\u305f\u3060\u3051\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3057\u307e\u3059\u3002\n\n\u30a2\u30d7\u30c7\u304c\u9032\u307e\u306a\u3044\u5834\u5408\u306f\u3001\u30a2\u30d7\u30ea\u3092\u7ba1\u7406\u8005\u3068\u3057\u3066\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002",
"description": "【Update: 2021/05/30】\n読み上げが動作しないバグを修正しました。\n場合によっては、標準エモートの読み替え設定が\nリセットされる場合がありますがご了承ください。\n\n【お知らせ】\n作者Twitter(@advanced_bear)の固定ツイートに掲載の画像とURLを、皆様の配信サイト等で宣伝いただけると嬉しいです。よろしくお願いします。\n\nアプデが進まない場合は、アプリを管理者として起動してください。",
"main": "index.html",
"manifestUrl": "https://raw.githubusercontent.com/advancedbear/TwitchTalkApp/master/src/package.json",
"name": "TwitchTalkApp",
"version": "1.2.7",
"version": "1.2.8",
"webexe_settings": {
"blacklist": "",
"custom_script": "",
Expand Down Expand Up @@ -42,4 +42,4 @@
"title": "TwitchTalkApp",
"width": 320
}
}
}

0 comments on commit 6bd23ed

Please sign in to comment.