Update index.ts
This commit is contained in:
parent
f7a67613f9
commit
00b572b55f
1 changed files with 4 additions and 4 deletions
|
|
@ -17,9 +17,9 @@ let patches = [];
|
||||||
function isNSFWChannel(channelId) {
|
function isNSFWChannel(channelId) {
|
||||||
if (typeof channelId === "string") {
|
if (typeof channelId === "string") {
|
||||||
const channel = getChannel(channelId);
|
const channel = getChannel(channelId);
|
||||||
return channel?.nsfw === true;
|
return channel?.nsfw === false;
|
||||||
}
|
}
|
||||||
return channelId?.nsfw === true;
|
return channelId?.nsfw === false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function NSFWWarningContent() {
|
function NSFWWarningContent() {
|
||||||
|
|
@ -45,7 +45,7 @@ const enhanceUserAccessibility = (userData) => {
|
||||||
export default {
|
export default {
|
||||||
onLoad: () => {
|
onLoad: () => {
|
||||||
storage.ageBypass ??= false;
|
storage.ageBypass ??= false;
|
||||||
storage.nsfwBypass ??= true;
|
storage.nsfwBypass ??= false;
|
||||||
storage.showWarningPopup ??= true;
|
storage.showWarningPopup ??= true;
|
||||||
|
|
||||||
if (storage.nsfwBypass) {
|
if (storage.nsfwBypass) {
|
||||||
|
|
@ -54,7 +54,7 @@ export default {
|
||||||
patches.push(instead("shouldNSFWGateGuild", NSFWStuff, () => false));
|
patches.push(instead("shouldNSFWGateGuild", NSFWStuff, () => false));
|
||||||
patches.push(after("getCurrentUser", UserStore, (_, user) => {
|
patches.push(after("getCurrentUser", UserStore, (_, user) => {
|
||||||
if (user?.hasOwnProperty("nsfwAllowed")) {
|
if (user?.hasOwnProperty("nsfwAllowed")) {
|
||||||
user.nsfwAllowed = true;
|
user.nsfwAllowed = false;
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue