Kahoot Namerator Bypass

Bypasses kahoot nickname generator

当前为 2022-09-27 提交的版本,查看 最新版本

// ==UserScript==
// @name        Kahoot Namerator Bypass
// @author      slither
// @version     1.0.0
// @license     MIT
// @description Bypasses kahoot nickname generator
// @match       https://kahoot.it/*
// @grant       none
// @run-at      document-start
// @namespace https://gf.qytechs.cn/users/964173
// ==/UserScript==

let username = "";

const nativeWebSocket = window.WebSocket;
window.WebSocket = function() {
	const ws = new nativeWebSocket(...arguments);
	const nativeSend = ws.send;
	const proxiedSend = function() {
		const interceptedMessage = JSON.parse(arguments[0]);
		if (interceptedMessage[0] && interceptedMessage[0].data && interceptedMessage[0].data.name) {
			interceptedMessage[0].data.name = username;
		}

		return nativeSend.apply(this, [JSON.stringify(interceptedMessage)]);
	};

	ws.send = proxiedSend;
	return ws;
};

const nativePushState = history.pushState;
history.pushState = function(state) {
	let n;
	while (!n) {
		n = window.prompt("Enter your username");
	}
	username = n;

	return nativePushState.apply(history, arguments);
};

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址