diff --git a/.npmignore b/.npmignore index 12f724a..31f2d3b 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,6 @@ node_modules docs .github -build.ts \ No newline at end of file +build.ts +pnpm-lock.yaml +package-lock.json \ No newline at end of file diff --git a/build.ts b/build.ts index 95cb5c8..d5f6565 100644 --- a/build.ts +++ b/build.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { build } from "esbuild" import { rimraf } from "rimraf" import { copyFile, mkdir, readFile } from 'node:fs/promises'; diff --git a/package.json b/package.json index 5300e7f..a9d027d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@z1g-project/injectify", "description": "A improved version of Sodiums Plugin Injector ready to use in all your projects.", - "version": "0.1.2-patch1", + "version": "0.1.3", "author": "z1g Project", "type": "module", "main": "lib/index.cjs", diff --git a/src/config.js b/src/config.js index e169331..18a950b 100644 --- a/src/config.js +++ b/src/config.js @@ -1,6 +1,7 @@ // Stock Settings, Refer to /docs to configure this correctly self.__injectify$cfg = { useProxy: false, // Weither or not it should use UV to inject scripts (proxied injection) + encoder: "XOR", // Encoder for useProxy to use to encode urls. fsType: "localstorage", // Defines the FS to use. Make sure you know what your doing fsItem: "injectifyPlugins", // Defines where to find the plugins to inject. location: "/injectify/", // Defines where injectify can find its files. diff --git a/src/xor.ts b/src/encoders.ts similarity index 100% rename from src/xor.ts rename to src/encoders.ts diff --git a/src/index.ts b/src/index.ts index 1648c27..daef08e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,17 +1,18 @@ import { LFS, FFS } from "./fs" import { cfg } from "./types" -import { XOR } from "./xor" +import { XOR } from "./encoders" export default async function injectify() { + // @ts-ignore const cfg: cfg = window.__injectify$cfg if (cfg.extraLogging === true) { console.log('Injectify has been inited') console.log(`Configuration: ${cfg}`) } if (cfg.fsType === "localstorage") { - let plugins = await LFS(cfg.fsItem) - let frameView = cfg.whereTo - let blacklist = cfg.blacklist + let plugins: any = await LFS(cfg.fsItem) + let frameView: any = cfg.whereTo + let blacklist: any = cfg.blacklist if (cfg.extraLogging === true) { console.log(frameView) } @@ -56,10 +57,10 @@ export default async function injectify() { }) }, 1000) } else if (cfg.fsType === "filer") { - let plugins = await FFS(cfg.fsItem) + let plugins: any = await FFS(cfg.fsItem) // Filer is very slow so this may take up some time. This is not suitible for injecting things such as Vencord. Read the docs for more info - let frameView = cfg.whereTo - let blacklist = cfg.blacklist + let frameView: any = cfg.whereTo + let blacklist: any = cfg.blacklist if (cfg.extraLogging === true) { console.log(frameView) } diff --git a/src/types.d.ts b/src/types.d.ts index b340a62..ce9f890 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -1,5 +1,6 @@ interface cfg { useProxy: boolean, + encoder: string, fsType: string, fsItem: string, location: string,