All players show unique/super petal particles in florr.io
当前为
// ==UserScript==
// @name Florr.IO Super/Unique Petal Particles
// @namespace http://tampermonkey.net/
// @version 0.1
// @description All players show unique/super petal particles in florr.io
// @author zertalious
// @match https://florr.io/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant none
// @run-at document-start
// @require https://cdn.jsdelivr.net/gh/Qwokka/WAIL@9ed21abc43045e19f9b3756de109a6e361fb9292/wail.js
// ==/UserScript==
const __instantiateStreaming = WebAssembly.instantiateStreaming;
WebAssembly.instantiateStreaming = function () {
return __instantiateStreaming(new Response());
}
const _instantiate = WebAssembly.instantiate;
WebAssembly.instantiate = function (buffer, imports) {
const bytes = new Uint8Array(buffer);
console.log('hooking wasm...');
find(bytes, [
OP_SET_LOCAL, ...VarUint32ToArray(0),
OP_GET_LOCAL, ...VarUint32ToArray(11),
OP_I32_LOAD8_U, 0, ...VarUint32ToArray(10),
OP_I32_CONST, ...VarSint32ToArray(7),
OP_I32_LT_U,
OP_BR_IF
], (i, j) => {
bytes[j - 3] = 0;
});
return _instantiate(bytes.buffer, imports);
}
function find(bytes, match, callback) {
console.log(`>>> SEARCHING >>>\n${match}`);
for (let i = 0; i < bytes.length; i++) {
let skip = false;
for (let j = 0; j < match.length; j++) {
if (match[j] !== -1 && bytes[i + j] !== match[j]) {
skip = true;
break;
}
}
if (skip) continue;
console.log(`found at index ${i}!`);
callback(i, i + match.length);
}
}