Skip to content

Commit

Permalink
Create allowNSFW.plugin.js
Browse files Browse the repository at this point in the history
  • Loading branch information
valzzu authored May 9, 2022
1 parent 079b1bd commit 086c7bc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions allowNSFW.plugin.js
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit 086c7bc

Please sign in to comment.