Delete plugins/nsfwbypass directory
Thanks VMuser, THIS IS WHAT YOU GET
This commit is contained in:
parent
e51785a1d2
commit
fb5ed47397
3 changed files with 0 additions and 278 deletions
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"name": "BetterNSFWGateBypass",
|
||||
"description": "Allows you to access NSFW channels without setting your age.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Slara",
|
||||
"id": "1008715724115685449"
|
||||
},
|
||||
{
|
||||
"name": "Win8.1VMUser",
|
||||
"id": "793935599702507542"
|
||||
}
|
||||
],
|
||||
"main": "src/index.ts",
|
||||
"vendetta": {
|
||||
"icon": "ic_edit_24px"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
import { storage } from "@vendetta/plugin";
|
||||
import { useProxy } from "@vendetta/storage";
|
||||
import { React, ReactNative as RN } from "@vendetta/metro/common";
|
||||
import { findByProps } from "@vendetta/metro";
|
||||
import { semanticColors } from "@vendetta/ui";
|
||||
import { showConfirmationAlert } from "@vendetta/ui/alerts";
|
||||
import { url } from "@vendetta/metro/common";
|
||||
|
||||
const { FormSection, FormRow, FormSwitchRow, FormText } = findByProps("FormSection");
|
||||
|
||||
const WarningContent = () => {
|
||||
return React.createElement(
|
||||
RN.Text,
|
||||
{ style: { fontSize: 14, lineHeight: 20 } },
|
||||
"WARNING: Enabling this option may lead to legal consequences. By using this option you agree to NOT report any issues to us and use it wisely. We do not take any responsibility for your account or data by using this mode. If this mode doesn't work please click the buttons below to read an article about how to bypass the check without the plugin."
|
||||
);
|
||||
};
|
||||
|
||||
interface SettingsProps {}
|
||||
|
||||
export const Settings: React.FC<SettingsProps> = () => {
|
||||
useProxy(storage);
|
||||
|
||||
storage.ageBypass ??= false;
|
||||
storage.nsfwBypass ??= true;
|
||||
storage.showWarningPopup ??= true;
|
||||
|
||||
const handleVisualA11yToggle = (enabled: boolean) => {
|
||||
if (enabled && !storage.ageBypass) {
|
||||
showConfirmationAlert({
|
||||
title: "⚠️ Legal Warning",
|
||||
content: React.createElement(WarningContent),
|
||||
confirmText: "I Understand and Accept",
|
||||
cancelText: "Cancel",
|
||||
onConfirm: () => {
|
||||
// Show second confirmation after first one
|
||||
showConfirmationAlert({
|
||||
title: "✋ Hang on!",
|
||||
content: React.createElement(
|
||||
RN.Text,
|
||||
{ style: { fontSize: 14, lineHeight: 20 } },
|
||||
"Please confirm you are over 18 years old and update your settings to see potentially inappropriate and sensitive content."
|
||||
),
|
||||
confirmText: "I'm 18+ and Accept",
|
||||
cancelText: "Cancel",
|
||||
onConfirm: () => {
|
||||
storage.ageBypass = true;
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
} else if (!enabled) {
|
||||
storage.ageBypass = false;
|
||||
}
|
||||
};
|
||||
|
||||
const openDocsLink = () => {
|
||||
url.openURL("https://github.com/ApexTeamPL/Apex-Plugins/tree/master/docs/nsfwbypass");
|
||||
};
|
||||
|
||||
return React.createElement(
|
||||
RN.ScrollView,
|
||||
{ style: { flex: 1 } },
|
||||
React.createElement(
|
||||
FormSection,
|
||||
{ title: "Accessibility Settings" },
|
||||
React.createElement(
|
||||
FormText,
|
||||
{
|
||||
style: {
|
||||
color: "#FFFFFF",
|
||||
marginBottom: 16,
|
||||
fontSize: 15,
|
||||
fontWeight: "500"
|
||||
}
|
||||
},
|
||||
"Configure accessibility features. Restart app to apply changes."
|
||||
),
|
||||
React.createElement(FormSwitchRow, {
|
||||
label: "🌟 Enhanced Visual Accessibility",
|
||||
subLabel: "⚠️ Advanced visual enhancement features - Use with caution",
|
||||
leading: React.createElement(FormRow.Icon, {
|
||||
source: findByProps("getAssetByName")?.getAssetByName("ic_accessibility")?.id || findByProps("getAssetByName")?.getAssetByName("ic_person")?.id
|
||||
}),
|
||||
value: storage.ageBypass,
|
||||
onValueChange: handleVisualA11yToggle
|
||||
}),
|
||||
React.createElement(FormSwitchRow, {
|
||||
label: "Enable NSFW Content Bypass",
|
||||
subLabel: "Bypasses all NSFW restrictions and gates completely",
|
||||
leading: React.createElement(FormRow.Icon, {
|
||||
source: findByProps("getAssetByName")?.getAssetByName("ic_warning")?.id
|
||||
}),
|
||||
value: storage.nsfwBypass,
|
||||
onValueChange: (value: boolean) => {
|
||||
storage.nsfwBypass = value;
|
||||
}
|
||||
}),
|
||||
React.createElement(FormSwitchRow, {
|
||||
label: "Show NSFW Channel Warning",
|
||||
subLabel: "Display a warning popup when entering NSFW channels",
|
||||
leading: React.createElement(FormRow.Icon, {
|
||||
source: findByProps("getAssetByName")?.getAssetByName("ic_alert")?.id
|
||||
}),
|
||||
value: storage.showWarningPopup,
|
||||
onValueChange: (value: boolean) => {
|
||||
storage.showWarningPopup = value;
|
||||
}
|
||||
})
|
||||
),
|
||||
React.createElement(
|
||||
FormSection,
|
||||
{ title: "Documentation" },
|
||||
React.createElement(
|
||||
RN.TouchableOpacity,
|
||||
{
|
||||
style: {
|
||||
backgroundColor: semanticColors.BACKGROUND_SECONDARY,
|
||||
padding: 16,
|
||||
margin: 16,
|
||||
borderRadius: 8,
|
||||
alignItems: "center"
|
||||
},
|
||||
onPress: openDocsLink
|
||||
},
|
||||
React.createElement(
|
||||
RN.Text,
|
||||
{
|
||||
style: {
|
||||
color: semanticColors.TEXT_NORMAL,
|
||||
fontSize: 16,
|
||||
fontWeight: "500"
|
||||
}
|
||||
},
|
||||
"📖 Note"
|
||||
),
|
||||
React.createElement(
|
||||
RN.Text,
|
||||
{
|
||||
style: {
|
||||
color: semanticColors.TEXT_MUTED,
|
||||
fontSize: 12,
|
||||
marginTop: 4
|
||||
}
|
||||
},
|
||||
"Read documentation and alternative bypass methods"
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
import { findByStoreName, findByProps, findByName } from "@vendetta/metro";
|
||||
import { after, instead } from "@vendetta/patcher";
|
||||
import { showConfirmationAlert } from "@vendetta/ui/alerts";
|
||||
import { React } from "@vendetta/metro/common";
|
||||
import { storage } from "@vendetta/plugin";
|
||||
import { Settings } from "./Settings";
|
||||
|
||||
const { Text } = findByProps("Button", "Text", "View");
|
||||
|
||||
const NSFWStuff = findByProps("isNSFWInvite");
|
||||
const UserStore = findByStoreName("UserStore");
|
||||
const { getChannel } = findByProps("getChannel") || findByName("getChannel", false);
|
||||
|
||||
let patches = [];
|
||||
|
||||
function isNSFWChannel(channelId) {
|
||||
if (typeof channelId === "string") {
|
||||
const channel = getChannel(channelId);
|
||||
return channel?.nsfw === true;
|
||||
}
|
||||
return channelId?.nsfw === true;
|
||||
}
|
||||
|
||||
function NSFWWarningContent() {
|
||||
return React.createElement(
|
||||
Text,
|
||||
{},
|
||||
"This channel contains content that may not be suitable for all audiences. Please proceed with caution and ensure you are in an appropriate environment."
|
||||
);
|
||||
}
|
||||
|
||||
const enhanceUserAccessibility = (userData) => {
|
||||
const parts = [97, 103, 101, 86, 101, 114, 105, 102, 105, 99, 97, 116, 105, 111, 110, 83, 116, 97, 116, 117, 115];
|
||||
const accessibilityKey = parts.map(x => String.fromCharCode(x)).join('');
|
||||
const level = [51];
|
||||
const accessibilityLevel = parseInt(String.fromCharCode(...level));
|
||||
|
||||
if (userData && userData.hasOwnProperty(accessibilityKey)) {
|
||||
userData[accessibilityKey] = accessibilityLevel;
|
||||
}
|
||||
return userData;
|
||||
};
|
||||
|
||||
export default {
|
||||
onLoad: () => {
|
||||
storage.ageBypass ??= false;
|
||||
storage.nsfwBypass ??= true;
|
||||
storage.showWarningPopup ??= true;
|
||||
|
||||
if (storage.nsfwBypass) {
|
||||
patches.push(instead("handleNSFWGuildInvite", NSFWStuff, () => false));
|
||||
patches.push(instead("isNSFWInvite", NSFWStuff, () => false));
|
||||
patches.push(instead("shouldNSFWGateGuild", NSFWStuff, () => false));
|
||||
patches.push(after("getCurrentUser", UserStore, (_, user) => {
|
||||
if (user?.hasOwnProperty("nsfwAllowed")) {
|
||||
user.nsfwAllowed = true;
|
||||
}
|
||||
return user;
|
||||
}));
|
||||
}
|
||||
|
||||
if (storage.ageBypass) {
|
||||
patches.push(after("getCurrentUser", UserStore, (_, user) => {
|
||||
return enhanceUserAccessibility(user);
|
||||
}));
|
||||
}
|
||||
|
||||
if (storage.showWarningPopup) {
|
||||
const transitionToGuild = findByProps("transitionToGuild");
|
||||
if (transitionToGuild) {
|
||||
for (const key of Object.keys(transitionToGuild)) {
|
||||
if (typeof transitionToGuild[key] === "function") {
|
||||
patches.push(
|
||||
instead(key, transitionToGuild, (args, orig) => {
|
||||
if (typeof args[0] === "string") {
|
||||
const pathMatch = args[0].match(/(\d+)$/);
|
||||
if (pathMatch?.[1]) {
|
||||
const channelId = pathMatch[1];
|
||||
const channel = getChannel(channelId);
|
||||
if (channel && isNSFWChannel(channel)) {
|
||||
showConfirmationAlert({
|
||||
title: "WARNING: Entering NSFW channel",
|
||||
content: React.createElement(NSFWWarningContent),
|
||||
confirmText: "Proceed with Caution",
|
||||
cancelText: "Cancel",
|
||||
onConfirm: () => { return orig(...args); },
|
||||
});
|
||||
return {};
|
||||
}
|
||||
}
|
||||
}
|
||||
return orig(...args);
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onUnload: () => {
|
||||
for (const unpatch of patches) {
|
||||
unpatch();
|
||||
}
|
||||
patches = [];
|
||||
},
|
||||
|
||||
settings: Settings
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue