Skip to content

Commit

Permalink
remove data-mod, to save ram
Browse files Browse the repository at this point in the history
  • Loading branch information
ZXMushroom63 committed Aug 31, 2024
1 parent f6c40df commit 66542d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions modloader.injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ window.modLoader = async function modLoader(modsArr = []) {
console.log("[EaglerML] Searching in iDB");
try {
var idbMods = await getMods();
modsArr.concat(idbMods
modsArr = modsArr.concat(idbMods
.filter(x => { return x && x.length > 0 })
.flatMap(x => { if (x.startsWith("web@")) { return x.replace("web@", "") } return x })
);
Expand Down Expand Up @@ -132,7 +132,6 @@ window.modLoader = async function modLoader(modsArr = []) {
console.log("[EaglerML] Loading " + currentMod + " via method B.");
var script = document.createElement("script");
script.src = currentMod;
script.setAttribute("data-mod", currentMod);
script.setAttribute("data-isMod", true);
script.onerror = () => {
console.log(
Expand Down Expand Up @@ -174,7 +173,6 @@ window.modLoader = async function modLoader(modsArr = []) {
methodB(currentMod);
return;
}
script.setAttribute("data-mod", currentMod);
script.setAttribute("data-isMod", true);
script.onerror = () => {
console.log(
Expand Down
4 changes: 1 addition & 3 deletions modloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ window.modLoader = async function modLoader(modsArr = []) {
console.log("[EaglerML] Searching in iDB");
try {
var idbMods = await getMods();
modsArr.concat(idbMods
modsArr = modsArr.concat(idbMods
.filter(x => { return x && x.length > 0 })
.flatMap(x => { if (x.startsWith("web@")) { return x.replace("web@", "") } return x })
);
Expand Down Expand Up @@ -133,7 +133,6 @@ window.modLoader = async function modLoader(modsArr = []) {
console.log("[EaglerML] Loading " + currentMod + " via method B.");
var script = document.createElement("script");
script.src = currentMod;
script.setAttribute("data-mod", currentMod);
script.setAttribute("data-isMod", true);
script.onerror = () => {
console.log(
Expand Down Expand Up @@ -175,7 +174,6 @@ window.modLoader = async function modLoader(modsArr = []) {
methodB(currentMod);
return;
}
script.setAttribute("data-mod", currentMod);
script.setAttribute("data-isMod", true);
script.onerror = () => {
console.log(
Expand Down

0 comments on commit 66542d3

Please sign in to comment.