max / egological

安装步骤: 先安装脚本管理器,再点“安装”,最后打开脚本适用的网站。

用户脚本新手指南 Chrome Edge Firefox

发布时间:

版本: v0.0.1+23f16c0

摘要: whyez?.

许可证: MIT

反功能: 未说明

脚本来源与更新状态

以下数据来自原始来源,与本站收到的安装请求分开统计。

原始脚本: egological

来源版本: v0.0.1

最近来源检查:

最近成功检查:

来源站日安装量
0
来源站总安装量
0
本站安装请求
0

本站收到的请求不代表用户已完成安装。

点击安装只表示本站收到安装请求,不代表安装已完成。 安装后无法使用?查看问题反馈与排查

Due to WebSocket hooking and timing requirements, this script needs to be loaded as an unpacked browser extension. Follow the simple steps below to set it up:

Step 1: Create a Folder
Create a new folder on your computer and name it:
egological-extension

Step 2: Create the Required Files
Inside that folder, you must have 3 files:
- manifest.json
- preload.js
- egological.js

1. manifest.json
Create a file named manifest.json and paste the following inside it:

```
{
"manifest_version": 3,
"name": "egological MooMoo Mod",
"version": "0.1.42",
"description": "Loads the egological client mod on MooMoo.io.",
"content_scripts": [
{
"matches": [
"https://moomoo.io/*",
"https://*.moomoo.io/*"
],
"js": ["preload.js"],
"run_at": "document_start",
"world": "MAIN"
},
{
"matches": [
"https://moomoo.io/*",
"https://*.moomoo.io/*"
],
"js": ["egological.js"],
"run_at": "document_end",
"world": "MAIN"
}
]
}
```

2. preload.js
Create a file named preload.js and paste the following inside it:

```
(function () {
if (window.__egologicalSocketHook) return;
const NativeWebSocket = window.WebSocket;
const pending = [];
let handoff = null;

function isGameSocket(url) {
try {
const parsed = new URL(String(url), location.href);
return parsed.protocol === "wss:" &&
(parsed.hostname === "localhost" || parsed.hostname.endsWith(".moomoo.io"));
} catch (e) {
return false;
}
}

function WrappedWebSocket(url, protocols) {
if (!isGameSocket(url)) return new NativeWebSocket(url, protocols);
if (handoff) handoff(String(url));
else pending.push(String(url));

const socket = new NativeWebSocket("wss://127.0.0.1:1/");
socket.close();
for (const event of ["onopen", "onmessage", "onerror", "onclose"])
Object.defineProperty(socket, event, { value: null, writable: true });
Object.defineProperty(socket, "readyState", { value: NativeWebSocket.CLOSED });
socket.send = function () {};
socket.close = function () {};
socket.addEventListener = function () {};
socket.removeEventListener = function () {};
return socket;
}
WrappedWebSocket.prototype = NativeWebSocket.prototype;
for (const state of ["CONNECTING", "OPEN", "CLOSING", "CLOSED"])
WrappedWebSocket[state] = NativeWebSocket[state];

window.OriginalWebSocket = NativeWebSocket;
window.__egologicalSocketHook = function (fn) {
handoff = fn;
while (pending.length) handoff(pending.shift());
};
window.WebSocket = WrappedWebSocket;
})();
```

3. egological.js
Create a file named egological.js and paste the entire code from this Greasy Fork page into it.

Step 3: Load into Your Browser
1. Open your Chromium-based browser (Chrome, Brave, Edge, Opera, etc.).
2. Go to the extensions management page:
- Chrome / Brave: chrome://extensions or brave://extensions
- Edge: edge://extensions
3. Enable Developer mode (toggle in the top-right corner).
4. Click the Load unpacked button in the top-left corner.
5. Select the egological-extension folder you created.
6. Open moomoo.io and enjoy!

---

This script is made as an open base template to show how to work with the updated protocol.

If you got banned:
- If it's a client ID ban: Open developer console (F12) on moomoo.io and run:
localStorage.removeItem("moo_did");
and reload the page.
- If it's an IP ban: If your ISP provides dynamic IPs, reboot your router from its admin panel (typically 192.168.1.1) or unplug the power for 3-5 minutes and plug it back in. (https://router-network.com/ip/192-168-1-1)

If you want to modify this script and make updates, edit the code in egological.js and reload the extension in chrome://extensions.

评分: 0