An injector for Discord that allows one to inject CSS and JavaScript.
This injector is so simple that it does not require the modification of discord '.asar' application archive
The installers are available in the releases. To install Pepega-Inject just download and start the installer and select the directory that contains the discord_desktop_core
module of Discord (it should contain core.asar
and index.js
files).
The developing of plugins is super basic, just add a folder with the name of your plugin in the pepega-inject/plugins
folder and drop some JavaScript and CSS files in there.
Pepega-Inject allows your plugin to have settings in JSON file format. The settings need to be concentrated in a single file called settings.json
and put somewhere within the your plugin folder.
The plugin settings can be accessed by plugin through the following object: PepegaInject.settings
. Example code:
// gets value of the specified attribute
PepegaInject.settings["some-attribute"]
The plugin loader of the Pepega-Inject injects each plugin with additional functionality that can be used anywhere withing the plugin. The loaded functionality can be accessed through the PepegaInject
object.
Object |
Description |
|
Allows to execute NodeJS code in the main Electron environment process (Electron documentation) through the Allows to send data back to the render process from withing the executable code through the Example: PepegaInject.IPC.execute(`
try {
pepegaSendValue('Hello World');
}
catch (err) {
console.error(err);
}
`); |