mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-23 06:01:38 -09:00
Add ModAPI.player.sendChatMessage, along with automatic this type of change
This commit is contained in:
parent
176159bc47
commit
9a623de631
10
index.html
10
index.html
@ -54,6 +54,9 @@
|
|||||||
border-radius: 0.6rem;
|
border-radius: 0.6rem;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
}
|
}
|
||||||
|
h6 {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -123,6 +126,11 @@
|
|||||||
<script src="filesaver.min.js"></script>
|
<script src="filesaver.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
document.querySelector("#htmlFile").addEventListener("input", (e)=>{
|
||||||
|
if (e.target.files[0]) {
|
||||||
|
document.querySelector(".custom-file-label").innerText = e.target.files[0].name;
|
||||||
|
}
|
||||||
|
});
|
||||||
function entriesToStaticVariableProxy(entries, prefix) {
|
function entriesToStaticVariableProxy(entries, prefix) {
|
||||||
var getComponents = "";
|
var getComponents = "";
|
||||||
entries.forEach((entry) => {
|
entries.forEach((entry) => {
|
||||||
@ -355,8 +363,6 @@ var main;(function(){`
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(prefix);
|
|
||||||
|
|
||||||
var proxy = entriesToStaticVariableProxy(entries, prefix);
|
var proxy = entriesToStaticVariableProxy(entries, prefix);
|
||||||
|
|
||||||
return proxy + "\n" + match;
|
return proxy + "\n" + match;
|
||||||
|
@ -146,6 +146,13 @@ globalThis.modapi_postinit = `(() => {
|
|||||||
},
|
},
|
||||||
methodName: method
|
methodName: method
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Prototype Injection, allows for far easier access to methods
|
||||||
|
if (typeof item === "function" && item.$meta && ModAPI.hooks._rippedMethodTypeMap[method] === "instance") {
|
||||||
|
item.prototype["$" + method.replace(compiledName + "_", "")] ||= function (...args) {
|
||||||
|
return ModAPI.hooks.methods[method].apply(this, [this, ...args]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -146,6 +146,13 @@
|
|||||||
},
|
},
|
||||||
methodName: method
|
methodName: method
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Prototype Injection, allows for far easier access to methods
|
||||||
|
if (typeof item === "function" && item.$meta && ModAPI.hooks._rippedMethodTypeMap[method] === "instance") {
|
||||||
|
item.prototype["$" + method.replace(compiledName + "_", "")] ||= function (...args) {
|
||||||
|
return ModAPI.hooks.methods[method].apply(this, [this, ...args]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user