获取王者赛宝自定义房间数据
// ==UserScript==
// @name 王者赛宝获取参数
// @namespace http://tampermonkey.net/
// @version 2023-12-23
// @description 获取王者赛宝自定义房间数据
// @author You
// @match https://h5.nes.smoba.qq.com/pvpesport.web.user/*
// @grant none
// @license MIT
// @run-at document-start
// ==/UserScript==
(function () {
'use strict';
(function (send) {
XMLHttpRequest.prototype.send = function () {
this.addEventListener('readystatechange', function () {
if (this.readyState === 4) {
if (this.responseURL.includes("https://api.nes.smoba.qq.com/pvpesport.sgamenes.nesholder.nesholder/AddPubGameInfo")) {
console.log(this)
try {
var json = JSON.parse(this.responseText).game_info.match_rule_cfg.battle_custom_params
if (json.length > 0) {
var json_str = JSON.stringify(json)
prompt("已获取到数据 请复制下列输入框内容", json_str)
}
} catch {
}
}
}
}, false);
send.apply(this, arguments);
}
})(XMLHttpRequest.prototype.send)
})();