Document the page plugin

This commit is contained in:
MotorTruck1221 2024-10-27 05:23:20 -06:00
parent 0eb1582f7d
commit 4e398bc9fd
No known key found for this signature in database
GPG key ID: 08F417E2B8B61EA4

View file

@ -129,6 +129,33 @@ touch index.js
3. Submit your plugin in the [Discord](https://discord.gg/unblocker)!
##### Proxied page plugins
- The allow modification of websites that UV proxies, (EX: you could add vencord to discord with this)
1. Create an index.js file (or another file name)
```bash
touch index.js
```
2. Edit that file with your code and the following:
```js
//Name this whatever.
function example() {
//You MUST return the following
return {
host: "example.com", //The host to match (so if the user visits example.com it will inject the html below.
html: "<script>console.log('Example')</script>", //Must return a string (and be valid HTML or your plugin will break). How you get that string is up to you
injectTo: "head" // Can be "head" or "body"
}
}
//Technically this could be named anything, recommended to call it `entryFunc`
self.entryFunc = example; //DO NOT run the function here. That will cause errors. Only assign the reference to the function here.
```
3. Submit it in our [Discord](https://discord.gg/unblocker)!
---
## Deployment