您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Prevents POST requests to discord science api
// ==UserScript== // @name Discord "science" API endpoint blocker // @namespace http://tampermonkey.net/ // @version 1.1 // @description Prevents POST requests to discord science api // @author Zombiebattler // @author https://github.com/Zombiebattler // @match https://discord.com/* // @license MIT // @grant none // ==/UserScript== (function() { 'use strict'; const blockedUrlPatterns = [ /https:\/\/discord\.com\/api\/v\d+\/science/ ]; // Override the XMLHttpRequest send method const originalSend = XMLHttpRequest.prototype.send; XMLHttpRequest.prototype.send = function(body) { for (let pattern of blockedUrlPatterns) { if (pattern.test(this._url) && this._method === "POST") { console.log("POST request to " + this._url + " has been blocked."); return; } } originalSend.call(this, body); }; const originalOpen = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function(method, url, async, user, password) { this._method = method; this._url = url; originalOpen.call(this, method, url, async, user, password); }; })();