diff --git a/nsfwbypass/index.js b/nsfwbypass/index.js index fe337bb..6a2b490 100644 --- a/nsfwbypass/index.js +++ b/nsfwbypass/index.js @@ -1 +1 @@ -(function(d,r,c,C,t,n,b,N,g){"use strict";const{FormSection:v,FormRow:y,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("")},S=function(e,a){return e.map(function(s,i){return s^a.charCodeAt(i%a.length)}).map(function(s){return String.fromCharCode(s)}).join("")},E=function(e){const a=P(),s=atob("U2xhcmFJc1NpZ21hQ2F0"),i=S([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(){b.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 l=function(u){u&&!n.storage.ageBypass?(i(!0),a("")):u||(n.storage.ageBypass=!1,i(!1),g.showToast("Visual accessibility disabled",r.findByProps("getAssetByName")?.getAssetByName("ic_info")?.id))},B=function(){E(e)?(n.storage.ageBypass=!0,i(!1),a(""),g.showToast("Visual accessibility enabled",r.findByProps("getAssetByName")?.getAssetByName("ic_check")?.id)):(g.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(y.Icon,{source:r.findByProps("getAssetByName")?.getAssetByName("ic_accessibility")?.id||r.findByProps("getAssetByName")?.getAssetByName("ic_person")?.id}),value:n.storage.ageBypass,onValueChange:l}),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(y.Icon,{source:r.findByProps("getAssetByName")?.getAssetByName("ic_warning")?.id}),value:n.storage.nsfwBypass,onValueChange:function(u){n.storage.nsfwBypass=u}}),t.React.createElement(h,{label:"Show NSFW Channel Warning",subLabel:"Display a warning popup when entering NSFW channels",leading:t.React.createElement(y.Icon,{source:r.findByProps("getAssetByName")?.getAssetByName("ic_alert")?.id}),value:n.storage.showWarningPopup,onValueChange:function(u){n.storage.showWarningPopup=u}})))},{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=[97,103,101,86,101,114,105,102,105,99,97,116,105,111,110,83,116,97,116,117,115].map(function(l){return String.fromCharCode(l)}).join(""),s=[51],i=parseInt(String.fromCharCode(...s));return e&&e.hasOwnProperty(a)&&(e[a]=i),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 l=s[0].match(/(\d+)$/);if(l?.[1]){const B=l[1],f=R(B);if(f&&x(f))return C.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(u,i,o,f,e,n,R,d){"use strict";const{FormSection:h,FormRow:y,FormSwitchRow:g,FormText:b}=i.findByProps("FormSection"),C=function(){return e.React.createElement(e.ReactNative.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.")},E=function(){R.useProxy(n.storage),n.storage.ageBypass??=!1,n.storage.nsfwBypass??=!0,n.storage.showWarningPopup??=!0;const t=function(s){s&&!n.storage.ageBypass?f.showConfirmationAlert({title:"\u26A0\uFE0F Legal Warning",content:e.React.createElement(C),confirmText:"I Understand and Accept",cancelText:"Cancel",onConfirm:function(){f.showConfirmationAlert({title:"\u270B Hang on!",content:e.React.createElement(e.ReactNative.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:function(){n.storage.ageBypass=!0}})}}):s||(n.storage.ageBypass=!1)},a=function(){e.url.openURL("https://github.com/ApexTeamPL/Apex-Plugins/tree/master/docs/nsfwbypass")};return e.React.createElement(e.ReactNative.ScrollView,{style:{flex:1}},e.React.createElement(h,{title:"Accessibility Settings"},e.React.createElement(b,{style:{color:"#FFFFFF",marginBottom:16,fontSize:15,fontWeight:"500"}},"Configure accessibility features. Restart app to apply changes."),e.React.createElement(g,{label:"\u{1F31F} Enhanced Visual Accessibility",subLabel:"\u26A0\uFE0F Advanced visual enhancement features - Use with caution",leading:e.React.createElement(y.Icon,{source:i.findByProps("getAssetByName")?.getAssetByName("ic_accessibility")?.id||i.findByProps("getAssetByName")?.getAssetByName("ic_person")?.id}),value:n.storage.ageBypass,onValueChange:t}),e.React.createElement(g,{label:"Enable NSFW Content Bypass",subLabel:"Bypasses all NSFW restrictions and gates completely",leading:e.React.createElement(y.Icon,{source:i.findByProps("getAssetByName")?.getAssetByName("ic_warning")?.id}),value:n.storage.nsfwBypass,onValueChange:function(s){n.storage.nsfwBypass=s}}),e.React.createElement(g,{label:"Show NSFW Channel Warning",subLabel:"Display a warning popup when entering NSFW channels",leading:e.React.createElement(y.Icon,{source:i.findByProps("getAssetByName")?.getAssetByName("ic_alert")?.id}),value:n.storage.showWarningPopup,onValueChange:function(s){n.storage.showWarningPopup=s}})),e.React.createElement(h,{title:"Documentation"},e.React.createElement(e.ReactNative.TouchableOpacity,{style:{backgroundColor:d.semanticColors.BACKGROUND_SECONDARY,padding:16,margin:16,borderRadius:8,alignItems:"center"},onPress:a},e.React.createElement(e.ReactNative.Text,{style:{color:d.semanticColors.TEXT_NORMAL,fontSize:16,fontWeight:"500"}},"\u{1F4D6} Note"),e.React.createElement(e.ReactNative.Text,{style:{color:d.semanticColors.TEXT_MUTED,fontSize:12,marginTop:4}},"Read documentation and alternative bypass methods"))))},{Text:v}=i.findByProps("Button","Text","View"),p=i.findByProps("isNSFWInvite"),w=i.findByStoreName("UserStore"),{getChannel:B}=i.findByProps("getChannel")||i.findByName("getChannel",!1);let r=[];function A(t){return typeof t=="string"?B(t)?.nsfw===!0:t?.nsfw===!0}function F(){return e.React.createElement(v,{},"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 S=function(t){const a=[97,103,101,86,101,114,105,102,105,99,97,116,105,111,110,83,116,97,116,117,115].map(function(l){return String.fromCharCode(l)}).join(""),s=[51],c=parseInt(String.fromCharCode(...s));return t&&t.hasOwnProperty(a)&&(t[a]=c),t};var P={onLoad:function(){if(n.storage.ageBypass??=!1,n.storage.nsfwBypass??=!0,n.storage.showWarningPopup??=!0,n.storage.nsfwBypass&&(r.push(o.instead("handleNSFWGuildInvite",p,function(){return!1})),r.push(o.instead("isNSFWInvite",p,function(){return!1})),r.push(o.instead("shouldNSFWGateGuild",p,function(){return!1})),r.push(o.after("getCurrentUser",w,function(t,a){return a?.hasOwnProperty("nsfwAllowed")&&(a.nsfwAllowed=!0),a}))),n.storage.ageBypass&&r.push(o.after("getCurrentUser",w,function(t,a){return S(a)})),n.storage.showWarningPopup){const t=i.findByProps("transitionToGuild");if(t)for(const a of Object.keys(t))typeof t[a]=="function"&&r.push(o.instead(a,t,function(s,c){if(typeof s[0]=="string"){const l=s[0].match(/(\d+)$/);if(l?.[1]){const T=l[1],N=B(T);if(N&&A(N))return f.showConfirmationAlert({title:"WARNING: Entering NSFW channel",content:e.React.createElement(F),confirmText:"Proceed with Caution",cancelText:"Cancel",onConfirm:function(){return c(...s)}}),{}}}return c(...s)}))}},onUnload:function(){for(const t of r)t();r=[]},settings:E};return u.default=P,Object.defineProperty(u,"__esModule",{value:!0}),u})({},vendetta.metro,vendetta.patcher,vendetta.ui.alerts,vendetta.metro.common,vendetta.plugin,vendetta.storage,vendetta.ui); diff --git a/nsfwbypass/manifest.json b/nsfwbypass/manifest.json index 579e89f..625a8f4 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":"3aa3c065b6c7e4c512cbd8862ac0770d0ae973927a484c898a4dcb0f8fe0d8f7"} \ 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":"ebe515e0ea483149fdf87490795f700c9cb1452d35c450ade44f9c960d3ec6ad"} \ No newline at end of file