您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Bypasses kahoot nickname generator
当前为
- // ==UserScript==
- // @name Kahoot Namerator Bypass
- // @author slither
- // @version 2.0.0
- // @license MIT
- // @description Bypasses kahoot nickname generator
- // @match https://kahoot.it/*
- // @grant none
- // @run-at document-start
- // @namespace https://greasyfork.org/users/964173
- // ==/UserScript==
- const nativeSend = XMLHttpRequest.prototype.send;
- XMLHttpRequest.prototype.send = function() {
- const oldCallback = this.onreadystatechange;
- this.onreadystatechange = function() {
- if (this.readyState === 4) {
- try {
- const response = JSON.parse(this.responseText);
- if (response.namerator === true) {
- response.namerator = false;
- alert("Namerator Bypassed!");
- }
- Object.defineProperty(this, "responseText",{
- writable: false,
- configurable: true,
- value: JSON.stringify(response)
- });
- } catch (e) {
- console.error(e);
- }
- }
- if (oldCallback)
- return oldCallback.apply(this, arguments);
- };
- return nativeSend.apply(this, arguments);
- };
- const nativeWebSocket = window.WebSocket;
- window.WebSocket = function() {
- const ws = new nativeWebSocket(...arguments);
- const nativeSend = ws.send;
- ws.send = function() {
- const interceptedMessage = JSON.parse(arguments[0]);
- if (interceptedMessage[0] && interceptedMessage[0].data && interceptedMessage[0].data.content === "{\"usingNamerator\":false}")
- interceptedMessage[0].data.content = "{\"usingNamerator\":true}";
- return nativeSend.apply(this, [JSON.stringify(interceptedMessage)]);
- };
- return ws;
- };