Skip to content

Commit

Permalink
feat(NoStyle): shitpost foundation approved plugin
Browse files Browse the repository at this point in the history
- makes nyaboom
- don't use it
- seriously
- it's bad
  • Loading branch information
Rico040 committed Aug 2, 2024
1 parent e2f9b91 commit 7b71f6e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugins/no-style/manifest.json
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"
}
}
33 changes: 33 additions & 0 deletions plugins/no-style/src/index.tsx
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();
}
}

0 comments on commit 7b71f6e

Please sign in to comment.