From 086c7bc0dfb9fc8ed30a77ffb3d5106563230523 Mon Sep 17 00:00:00 2001 From: valzzu <52419539+valzzu@users.noreply.github.com> Date: Mon, 9 May 2022 07:24:26 +0300 Subject: [PATCH] Create allowNSFW.plugin.js --- allowNSFW.plugin.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 allowNSFW.plugin.js diff --git a/allowNSFW.plugin.js b/allowNSFW.plugin.js new file mode 100644 index 0000000..16716b1 --- /dev/null +++ b/allowNSFW.plugin.js @@ -0,0 +1,20 @@ +//META{"name":"AllowNSFW","authorId":"342662708795146242","website":"https://github.com/valzzu/", "source":"https://github.com/valzzu/AllowNSFW-BetterDiscord-Plugin"}*// + +module.exports = class AllowNSFW { + getName() {return "AllowNSFW";} + getDescription() {return "With this plugin you can see NSFW channels, for now!";} + getVersion() {return "1.0.0";} + getAuthor() {return "valzzu";} + load() {} + start() { + this.update(); + } + stop() {} + onSwitch() { + this.update(); + } + update () { + var findModule=(item)=>window.webpackChunkdiscord_app.push([[Math.random()],{},(req)=>{for(const m of Object.keys(req.c).map((x)=>req.c[x].exports).filter((x)=>x)){if(m.default&&m.default[item]!==undefined)return m.default}}]) + findModule('getCurrentUser').getCurrentUser().nsfwAllowed = true + } +}