{"id":13430314,"url":"https://github.com/xfgryujk/bliveproxy","last_synced_at":"2025-04-16T01:33:18.418Z","repository":{"id":50661766,"uuid":"318535508","full_name":"xfgryujk/bliveproxy","owner":"xfgryujk","description":"B站直播websocket hook框架","archived":false,"fork":false,"pushed_at":"2022-04-29T15:00:03.000Z","size":1080,"stargazers_count":29,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T05:03:42.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xfgryujk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-04T14:08:54.000Z","updated_at":"2025-01-26T06:42:35.000Z","dependencies_parsed_at":"2022-09-02T04:20:15.517Z","dependency_job_id":null,"html_url":"https://github.com/xfgryujk/bliveproxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfgryujk%2Fbliveproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfgryujk%2Fbliveproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfgryujk%2Fbliveproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfgryujk%2Fbliveproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xfgryujk","download_url":"https://codeload.github.com/xfgryujk/bliveproxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249182507,"owners_count":21226081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T02:00:52.122Z","updated_at":"2025-04-16T01:33:18.089Z","avatar_url":"https://github.com/xfgryujk.png","language":"JavaScript","funding_links":[],"categories":["篡改猴脚本"],"sub_categories":["直播脚本"],"readme":"# bliveproxy\nB站直播websocket hook框架\n\n* [greasyfork](https://greasyfork.org/zh-CN/scripts/417560-bliveproxy)\n* [NGA帖子](https://bbs.nga.cn/read.php?tid=24449759)\n\n## 使用例\n### 1. 把同传弹幕改成顶端弹幕并高亮\n```javascript\n// ==UserScript==\n// @name         bliveproxy-demo1\n// @namespace    http://tampermonkey.net/\n// @version      0.1\n// @description  把同传弹幕改成顶端弹幕并高亮\n// @author       xfgryujk\n// @include      /https?:\\/\\/live\\.bilibili\\.com\\/?\\??.*/\n// @include      /https?:\\/\\/live\\.bilibili\\.com\\/\\d+\\??.*/\n// @include      /https?:\\/\\/live\\.bilibili\\.com\\/(blanc\\/)?\\d+\\??.*/\n// @run-at       document-start\n// @require      https://cdn.jsdelivr.net/gh/google/brotli@5692e422da6af1e991f9182345d58df87866bc5e/js/decode.js\n// @require      https://cdn.jsdelivr.net/npm/pako@2.0.3/dist/pako_inflate.min.js\n// @require      https://greasyfork.org/scripts/417560-bliveproxy/code/bliveproxy.js?version=931022\n// @grant        none\n// ==/UserScript==\n\n(function() {\n  // 同传弹幕正则表达式\n  const TRANSLATION_REG = /【/\n\n  bliveproxy.addCommandHandler('DANMU_MSG', command =\u003e {\n    let info = command.info\n    if (!TRANSLATION_REG.test(info[1])) {\n      return\n    }\n\n    // 显示模式：1滚动，4底部，5顶部\n    info[0][1] = 5\n    // 尺寸\n    info[0][2] *= 1.5\n    // 颜色\n    info[0][3] = 0xFF0000\n  })\n})();\n\n```\n\n![截图1](https://github.com/xfgryujk/bliveproxy/blob/master/screenshots/1.png)\n\n### 2. 把打赏全换成自己的名字\n```javascript\n// ==UserScript==\n// @name         bliveproxy-demo2\n// @namespace    http://tampermonkey.net/\n// @version      0.1\n// @description  把打赏全换成自己的名字\n// @author       xfgryujk\n// @include      /https?:\\/\\/live\\.bilibili\\.com\\/?\\??.*/\n// @include      /https?:\\/\\/live\\.bilibili\\.com\\/\\d+\\??.*/\n// @include      /https?:\\/\\/live\\.bilibili\\.com\\/(blanc\\/)?\\d+\\??.*/\n// @run-at       document-start\n// @require      https://cdn.jsdelivr.net/gh/google/brotli@5692e422da6af1e991f9182345d58df87866bc5e/js/decode.js\n// @require      https://cdn.jsdelivr.net/npm/pako@2.0.3/dist/pako_inflate.min.js\n// @require      https://greasyfork.org/scripts/417560-bliveproxy/code/bliveproxy.js?version=931022\n// @grant        none\n// ==/UserScript==\n\n(function() {\n  // 用户名\n  const USERNAME = 'xfgryujk'\n  // 头像URL\n  const AVATAR_URL = 'https://i0.hdslb.com/bfs/face/29b6be8aa611e70a3d3ac219cdaf5e72b604f2de.jpg'\n\n  // 礼物\n  bliveproxy.addCommandHandler('SEND_GIFT', command =\u003e {\n    let data = command.data\n    data.uname = USERNAME\n    data.face = AVATAR_URL\n  })\n  bliveproxy.addCommandHandler('COMBO_SEND', command =\u003e {\n    let data = command.data\n    data.uname = USERNAME\n  })\n  // 醒目留言\n  bliveproxy.addCommandHandler('SUPER_CHAT_MESSAGE', command =\u003e {\n    let data = command.data\n    data.user_info.uname = USERNAME\n    data.user_info.face = AVATAR_URL\n  })\n  // 上舰\n  // 其实上舰消息用的不是这条，懒得找了\n  bliveproxy.addCommandHandler('GUARD_BUY', command =\u003e {\n    let data = command.data\n    data.username = USERNAME\n  })\n})();\n\n```\n\n![截图2](https://github.com/xfgryujk/bliveproxy/blob/master/screenshots/2.png)  \n![截图3](https://github.com/xfgryujk/bliveproxy/blob/master/screenshots/3.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxfgryujk%2Fbliveproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxfgryujk%2Fbliveproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxfgryujk%2Fbliveproxy/lists"}