generated from vendetta-mod/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(NoStyle): shitpost foundation approved plugin
- makes nyaboom - don't use it - seriously - it's bad
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "NoStyle", | ||
"description": "DISCLAIMER: This plugin breaks Discord, DO NOT ENABLE it if you don't know how to disable it manually!", | ||
"authors": [ | ||
{ | ||
"name": "Rico040", | ||
"id": "619474349845643275" | ||
} | ||
], | ||
"main": "src/index.tsx", | ||
"vendetta": { | ||
"icon": "img_none" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { ReactNative as RN } from "@vendetta/metro/common"; | ||
import { before } from "@vendetta/patcher"; | ||
import { id } from "@vendetta/plugin"; | ||
import { stopPlugin } from "@vendetta/plugins"; | ||
import { storage } from "@vendetta/plugin"; | ||
|
||
// unstyled | ||
const unstyle = {}; | ||
storage.firstTime ??= true; | ||
|
||
let unpatchText: () => boolean; | ||
let unpatchView: () => boolean; | ||
|
||
export default { | ||
onLoad: () => { | ||
// don't start plugin immediately | ||
if (storage.firstTime == true) { | ||
stopPlugin(id); | ||
storage.firstTime = false; | ||
} else { | ||
unpatchText = before("render", RN.Text, ([x]) => { | ||
x.style = unstyle; | ||
}) | ||
unpatchView = before("render", RN.View, ([x]) => { | ||
x.style = unstyle; | ||
}) | ||
} | ||
}, | ||
onUnload: () => { | ||
unpatchText(); | ||
unpatchView(); | ||
} | ||
} |