Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Notplayingallday383 committed May 14, 2024
1 parent 1769f6e commit 95bbba4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
docs
.github
build.ts
build.ts
pnpm-lock.yaml
package-lock.json
1 change: 1 addition & 0 deletions build.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { build } from "esbuild"
import { rimraf } from "rimraf"
import { copyFile, mkdir, readFile } from 'node:fs/promises';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/config.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
File renamed without changes.
15 changes: 8 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down
1 change: 1 addition & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
interface cfg {
useProxy: boolean,
encoder: string,
fsType: string,
fsItem: string,
location: string,
Expand Down

0 comments on commit 95bbba4

Please sign in to comment.