Skip to content

Commit

Permalink
紧急修复: WebSocket无法运作问题
Browse files Browse the repository at this point in the history
  • Loading branch information
eric2788 committed Dec 3, 2020
1 parent ed02c66 commit c040af4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
env:
version: 0.0.3.1
version: 0.0.3.2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

name: bilibili jimaku filter publish sign
Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,19 +279,19 @@ function wsMonitor(settings){
<script src="${browser.runtime.getURL('cdn/blive-proxy.js')}"></script>
`
$$$(document.head).append(b)
window.addEventListener('ws:bilibili-live', ({detail: {cmd, command}}) => {
if (cmd === 'DANMU_MSG'){
const danmaku = command.info[1]
window.addEventListener('ws:bilibili-live', ({detail: e}) => {
if (e.cmd === 'DANMU_MSG'){
const danmaku = e.command.info[1]
const jimaku = toJimaku(danmaku, settings.regex)
if (jimaku !== undefined){
pushSubtitle(jimaku, settings)
//在使用 websocket 的情况下,可以强制置顶和置底弹幕
switch(settings.webSocketSettings.danmakuPosition){
case "top":
command.info[0][1] = 5
e.command.info[0][1] = 5
break;
case "bottom":
command.info[0][1] = 4
e.command.info[0][1] = 4
break;
default:
break;
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"manifest_version": 2,
"name": "bilibili jimaku filter",
"version": "0.0.3.1",
"version": "0.0.3.2",

"description": "bilibili jimaku filter by ericlam",
"author": "Eric Lam",
Expand Down

0 comments on commit c040af4

Please sign in to comment.