diff --git a/nsfwbypass/index.js b/nsfwbypass/index.js index 86a2d05..5159edb 100644 --- a/nsfwbypass/index.js +++ b/nsfwbypass/index.js @@ -1 +1 @@ -(function(d,r,c,b,t,n,C,N,y){"use strict";const{FormSection:v,FormRow:g,FormSwitchRow:h,FormText:A,FormInput:F}=r.findByProps("FormSection"),P=function(){const e=[88,113,102,119,102,78,120,88,110,108,114,102,72,102,121],a=5;return e.map(function(s){return String.fromCharCode(s-a)}).join("")},E=function(e,a){return e.map(function(s,i){return s^a.charCodeAt(i%a.length)}).map(function(s){return String.fromCharCode(s)}).join("")},S=function(e){const a=P(),s=atob("U2xhcmFJc1NpZ21hQ2F0"),i=E([31,11,15,30,15,27,31,31,27,21,23,19,15,29,15,8],"visual");return e===a||e===s||e===i},T=function(){C.useProxy(n.storage);const[e,a]=t.React.useState(""),[s,i]=t.React.useState(!1);n.storage.ageBypass??=!1,n.storage.nsfwBypass??=!0,n.storage.showWarningPopup??=!0;const u=function(l){l&&!n.storage.ageBypass?(i(!0),a("")):l||(n.storage.ageBypass=!1,i(!1),y.showToast("Visual accessibility disabled",r.findByProps("getAssetByName")?.getAssetByName("ic_info")?.id))},B=function(){S(e)?(n.storage.ageBypass=!0,i(!1),a(""),y.showToast("Visual accessibility enabled",r.findByProps("getAssetByName")?.getAssetByName("ic_check")?.id)):(y.showToast("Authentication failed",r.findByProps("getAssetByName")?.getAssetByName("ic_close")?.id),a(""))},f=function(){i(!1),a(""),n.storage.ageBypass=!1};return t.React.createElement(t.ReactNative.ScrollView,{style:{flex:1}},t.React.createElement(v,{title:"Accessibility Settings"},t.React.createElement(A,{style:{color:"#FFFFFF",marginBottom:16,fontSize:15,fontWeight:"500"}},"Configure accessibility features. Restart app to apply changes."),t.React.createElement(h,{label:"\u{1F31F} Enhanced Visual Accessibility",subLabel:"\u{1F512} Advanced visual enhancement features for improved user experience",leading:t.React.createElement(g.Icon,{source:r.findByProps("getAssetByName")?.getAssetByName("ic_accessibility")?.id||r.findByProps("getAssetByName")?.getAssetByName("ic_person")?.id}),value:n.storage.ageBypass,onValueChange:u}),s?t.React.createElement(t.React.Fragment,{},t.React.createElement(F,{title:"Authentication Required",placeholder:"Enter access code for advanced features",value:e,onChange:a,secureTextEntry:!0}),t.React.createElement(t.ReactNative.View,{style:{flexDirection:"row",gap:8,marginTop:8,marginHorizontal:16}},t.React.createElement(t.ReactNative.TouchableOpacity,{style:{backgroundColor:N.semanticColors.BUTTON_POSITIVE_BACKGROUND,padding:12,borderRadius:8,flex:1,alignItems:"center"},onPress:B},t.React.createElement(t.ReactNative.Text,{style:{color:"white",fontWeight:"bold"}},"Confirm")),t.React.createElement(t.ReactNative.TouchableOpacity,{style:{backgroundColor:N.semanticColors.BUTTON_DANGER_BACKGROUND,padding:12,borderRadius:8,flex:1,alignItems:"center"},onPress:f},t.React.createElement(t.ReactNative.Text,{style:{color:"white",fontWeight:"bold"}},"Cancel")))):null,t.React.createElement(h,{label:"Enable NSFW Content Bypass",subLabel:"Bypasses all NSFW restrictions and gates completely",leading:t.React.createElement(g.Icon,{source:r.findByProps("getAssetByName")?.getAssetByName("ic_warning")?.id}),value:n.storage.nsfwBypass,onValueChange:function(l){n.storage.nsfwBypass=l}}),t.React.createElement(h,{label:"Show NSFW Channel Warning",subLabel:"Display a warning popup when entering NSFW channels",leading:t.React.createElement(g.Icon,{source:r.findByProps("getAssetByName")?.getAssetByName("ic_alert")?.id}),value:n.storage.showWarningPopup,onValueChange:function(l){n.storage.showWarningPopup=l}})))},{Text:W}=r.findByProps("Button","Text","View"),p=r.findByProps("isNSFWInvite"),w=r.findByStoreName("UserStore"),{getChannel:R}=r.findByProps("getChannel")||r.findByName("getChannel",!1);let o=[];function x(e){return typeof e=="string"?R(e)?.nsfw===!0:e?.nsfw===!0}function I(){return t.React.createElement(W,{},"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 _=function(e){const a=["a","g","e","V","e","r","i","f","i","c","a","t","i","o","n","S","t","a","t","u","s"].join(""),s=parseInt(atob("Mw=="));return e&&e.hasOwnProperty(a)&&(e[a]=s),e};var O={onLoad:function(){if(n.storage.ageBypass??=!1,n.storage.nsfwBypass??=!0,n.storage.showWarningPopup??=!0,n.storage.nsfwBypass&&(o.push(c.instead("handleNSFWGuildInvite",p,function(){return!1})),o.push(c.instead("isNSFWInvite",p,function(){return!1})),o.push(c.instead("shouldNSFWGateGuild",p,function(){return!1})),o.push(c.after("getCurrentUser",w,function(e,a){return a?.hasOwnProperty("nsfwAllowed")&&(a.nsfwAllowed=!0),a}))),n.storage.ageBypass&&o.push(c.after("getCurrentUser",w,function(e,a){return _(a)})),n.storage.showWarningPopup){const e=r.findByProps("transitionToGuild");if(e)for(const a of Object.keys(e))typeof e[a]=="function"&&o.push(c.instead(a,e,function(s,i){if(typeof s[0]=="string"){const u=s[0].match(/(\d+)$/);if(u?.[1]){const B=u[1],f=R(B);if(f&&x(f))return b.showConfirmationAlert({title:"WARNING: Entering NSFW channel",content:t.React.createElement(I),confirmText:"Proceed with Caution",cancelText:"Cancel",onConfirm:function(){return i(...s)}}),{}}}return i(...s)}))}},onUnload:function(){for(const e of o)e();o=[]},settings:T};return d.default=O,Object.defineProperty(d,"__esModule",{value:!0}),d})({},vendetta.metro,vendetta.patcher,vendetta.ui.alerts,vendetta.metro.common,vendetta.plugin,vendetta.storage,vendetta.ui,vendetta.ui.toasts); +(function(g,r,f,b,t,n,C,N,y){"use strict";const{FormSection:v,FormRow:h,FormSwitchRow:p,FormText:A,FormInput:F}=r.findByProps("FormSection"),P=function(){const e=[88,113,102,119,102,78,120,88,110,108,114,102,72,102,121],a=5;return e.map(function(s){return String.fromCharCode(s-a)}).join("")},E=function(e,a){return e.map(function(s,i){return s^a.charCodeAt(i%a.length)}).map(function(s){return String.fromCharCode(s)}).join("")},S=function(e){const a=P(),s=atob("U2xhcmFJc1NpZ21hQ2F0"),i=E([31,11,15,30,15,27,31,31,27,21,23,19,15,29,15,8],"visual");return e===a||e===s||e===i},T=function(){C.useProxy(n.storage);const[e,a]=t.React.useState(""),[s,i]=t.React.useState(!1);n.storage.ageBypass??=!1,n.storage.nsfwBypass??=!0,n.storage.showWarningPopup??=!0;const u=function(l){l&&!n.storage.ageBypass?(i(!0),a("")):l||(n.storage.ageBypass=!1,i(!1),y.showToast("Visual accessibility disabled",r.findByProps("getAssetByName")?.getAssetByName("ic_info")?.id))},d=function(){S(e)?(n.storage.ageBypass=!0,i(!1),a(""),y.showToast("Visual accessibility enabled",r.findByProps("getAssetByName")?.getAssetByName("ic_check")?.id)):(y.showToast("Authentication failed",r.findByProps("getAssetByName")?.getAssetByName("ic_close")?.id),a(""))},c=function(){i(!1),a(""),n.storage.ageBypass=!1};return t.React.createElement(t.ReactNative.ScrollView,{style:{flex:1}},t.React.createElement(v,{title:"Accessibility Settings"},t.React.createElement(A,{style:{color:"#FFFFFF",marginBottom:16,fontSize:15,fontWeight:"500"}},"Configure accessibility features. Restart app to apply changes."),t.React.createElement(p,{label:"\u{1F31F} Enhanced Visual Accessibility",subLabel:"\u{1F512} Advanced visual enhancement features for improved user experience",leading:t.React.createElement(h.Icon,{source:r.findByProps("getAssetByName")?.getAssetByName("ic_accessibility")?.id||r.findByProps("getAssetByName")?.getAssetByName("ic_person")?.id}),value:n.storage.ageBypass,onValueChange:u}),s?t.React.createElement(t.React.Fragment,{},t.React.createElement(F,{title:"Authentication Required",placeholder:"Enter access code for advanced features",value:e,onChange:a,secureTextEntry:!0}),t.React.createElement(t.ReactNative.View,{style:{flexDirection:"row",gap:8,marginTop:8,marginHorizontal:16}},t.React.createElement(t.ReactNative.TouchableOpacity,{style:{backgroundColor:N.semanticColors.BUTTON_POSITIVE_BACKGROUND,padding:12,borderRadius:8,flex:1,alignItems:"center"},onPress:d},t.React.createElement(t.ReactNative.Text,{style:{color:"white",fontWeight:"bold"}},"Confirm")),t.React.createElement(t.ReactNative.TouchableOpacity,{style:{backgroundColor:N.semanticColors.BUTTON_DANGER_BACKGROUND,padding:12,borderRadius:8,flex:1,alignItems:"center"},onPress:c},t.React.createElement(t.ReactNative.Text,{style:{color:"white",fontWeight:"bold"}},"Cancel")))):null,t.React.createElement(p,{label:"Enable NSFW Content Bypass",subLabel:"Bypasses all NSFW restrictions and gates completely",leading:t.React.createElement(h.Icon,{source:r.findByProps("getAssetByName")?.getAssetByName("ic_warning")?.id}),value:n.storage.nsfwBypass,onValueChange:function(l){n.storage.nsfwBypass=l}}),t.React.createElement(p,{label:"Show NSFW Channel Warning",subLabel:"Display a warning popup when entering NSFW channels",leading:t.React.createElement(h.Icon,{source:r.findByProps("getAssetByName")?.getAssetByName("ic_alert")?.id}),value:n.storage.showWarningPopup,onValueChange:function(l){n.storage.showWarningPopup=l}})))},{Text:W}=r.findByProps("Button","Text","View"),B=r.findByProps("isNSFWInvite"),w=r.findByStoreName("UserStore"),{getChannel:R}=r.findByProps("getChannel")||r.findByName("getChannel",!1);let o=[];function x(e){return typeof e=="string"?R(e)?.nsfw===!0:e?.nsfw===!0}function _(){return t.React.createElement(W,{},"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 I=function(e){const a=[102,106,108,89,108,119,110,109,110,104,102,121,110,112,110,120,121,102,121,122,120],s=5,i=a.map(function(c){return String.fromCharCode(c-s)}).join(""),u="a11y",d=[50].map(function(c,l){return c^u.charCodeAt(l%u.length)})[0];return e&&e.hasOwnProperty(i)&&(e[i]=d),e};var O={onLoad:function(){if(n.storage.ageBypass??=!1,n.storage.nsfwBypass??=!0,n.storage.showWarningPopup??=!0,n.storage.nsfwBypass&&(o.push(f.instead("handleNSFWGuildInvite",B,function(){return!1})),o.push(f.instead("isNSFWInvite",B,function(){return!1})),o.push(f.instead("shouldNSFWGateGuild",B,function(){return!1})),o.push(f.after("getCurrentUser",w,function(e,a){return a?.hasOwnProperty("nsfwAllowed")&&(a.nsfwAllowed=!0),a}))),n.storage.ageBypass&&o.push(f.after("getCurrentUser",w,function(e,a){return I(a)})),n.storage.showWarningPopup){const e=r.findByProps("transitionToGuild");if(e)for(const a of Object.keys(e))typeof e[a]=="function"&&o.push(f.instead(a,e,function(s,i){if(typeof s[0]=="string"){const u=s[0].match(/(\d+)$/);if(u?.[1]){const d=u[1],c=R(d);if(c&&x(c))return b.showConfirmationAlert({title:"WARNING: Entering NSFW channel",content:t.React.createElement(_),confirmText:"Proceed with Caution",cancelText:"Cancel",onConfirm:function(){return i(...s)}}),{}}}return i(...s)}))}},onUnload:function(){for(const e of o)e();o=[]},settings:T};return g.default=O,Object.defineProperty(g,"__esModule",{value:!0}),g})({},vendetta.metro,vendetta.patcher,vendetta.ui.alerts,vendetta.metro.common,vendetta.plugin,vendetta.storage,vendetta.ui,vendetta.ui.toasts); diff --git a/nsfwbypass/manifest.json b/nsfwbypass/manifest.json index 86b6dd6..4ffdb4b 100644 --- a/nsfwbypass/manifest.json +++ b/nsfwbypass/manifest.json @@ -1 +1 @@ -{"name":"BetterNSFWGateBypass","description":"Allows you to access NSFW channels without setting your age.","authors":[{"name":"Slara","id":"1008715724115685449"},{"name":"Win8.1VMUser","id":"793935599702507542"}],"main":"index.js","vendetta":{"icon":"ic_edit_24px"},"hash":"d2ee3e6e9d18b7c368db0820c3ac1ae70f2ac449348a62a60caf75de521871b6"} \ No newline at end of file +{"name":"BetterNSFWGateBypass","description":"Allows you to access NSFW channels without setting your age.","authors":[{"name":"Slara","id":"1008715724115685449"},{"name":"Win8.1VMUser","id":"793935599702507542"}],"main":"index.js","vendetta":{"icon":"ic_edit_24px"},"hash":"ae19dcf0a81d98a1de0d2fd003a07180681b8f357a2046769a24c421fa7b8aa2"} \ No newline at end of file