Last active
January 2, 2022 02:36
-
-
Save XiaoMiku01/f405f144474c6b676830459475dc10f2 to your computer and use it in GitHub Desktop.
阿瓦隆杀手!!!(已失效)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 阿瓦隆杀手 | |
// @namespace https://space.bilibili.com/32957695 | |
// @version 0.1 | |
// @description 干翻阿瓦隆|陈睿,我杀你妈!1000遍!!也不够!!! | |
// @author 晓轩iMIKU | |
// @license MIT | |
// @compatible chrome 80 or later | |
// @compatible edge 80 or later | |
// @compatible firefox 74 or later | |
// @compatible safari 13.1 or later | |
// @match *://*.bilibili.com/* | |
// @icon https://www.google.com/s2/favicons?domain=bilibili.com | |
// @require https://unpkg.com/ajax-hook@2.0.3/dist/ajaxhook.min.js | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.onload = function () { | |
ah.proxy({ | |
onRequest: (config, handler) => { | |
if (config.url.includes('/x/v2/reply/add')) { | |
config.url = config.url.replace('/x/v2/reply/add', '/x/intl/reply/add'); | |
} | |
handler.next(config); | |
}, | |
onResponse: (response, handler) => { | |
if (response.config.url.includes('/x/intl/reply/add')) { | |
response.response = update_response(response.response); | |
} | |
handler.next(response); | |
} | |
}) | |
} | |
function update_response(response_str) { | |
var response_json = JSON.parse(response_str) | |
response_json.data.reply.member.user_sailing = { | |
cardbg: null, | |
cardbg_with_focus: null, | |
pendant: null | |
} | |
return JSON.stringify(response_json) | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment