diff --git a/nsfwbypass/index.js b/nsfwbypass/index.js index e4dfdea..4634558 100644 --- a/nsfwbypass/index.js +++ b/nsfwbypass/index.js @@ -1 +1 @@ -(function(R,s,d,u,e,t,E,f){"use strict";const{FormSection:C,FormRow:g,FormSwitchRow:F,FormText:P,FormInput:T}=s.findByProps("FormSection"),v=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.")},A=function(){E.useProxy(t.storage);const[a,n]=e.React.useState(""),[o,i]=e.React.useState(!1);t.storage.ageBypass??=!1,t.storage.nsfwBypass??=!0,t.storage.showWarningPopup??=!0,t.storage.lockNSFWChannels??=!1,t.storage.nsfwPassword??="";const l=function(){o?a.length>0&&(t.storage.nsfwPassword=a,n(""),i(!1),console.log("NSFW password set successfully")):i(!0)},N=function(){n(""),i(!1)},y=function(r){r&&!t.storage.ageBypass?u.showConfirmationAlert({title:"\u26A0\uFE0F Legal Warning",content:e.React.createElement(v),confirmText:"I Understand and Accept",cancelText:"Cancel",onConfirm:function(){u.showConfirmationAlert({title:"Hang on!",content:e.React.createElement(e.ReactNative.Text,{style:{fontSize:14,lineHeight:20}},"Please confirm you are over 18 years of age and update your settings to see potentially inappropriate and sensitive content."),confirmText:"I'm 18+ and Accept",cancelText:"Cancel",onConfirm:function(){t.storage.ageBypass=!0}})}}):r||(t.storage.ageBypass=!1)},h=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(C,{title:"Accessibility Settings"},e.React.createElement(P,{style:{color:"#FFFFFF",marginBottom:16,fontSize:15,fontWeight:"500"}},"Configure accessibility features. Restart app to apply changes."),e.React.createElement(F,{label:"\u{1F31F} Enhanced Visual Accessibility",subLabel:"\u26A0\uFE0F Advanced visual enhancement features - Use with caution",leading:e.React.createElement(g.Icon,{source:s.findByProps("getAssetByName")?.getAssetByName("ic_accessibility")?.id||s.findByProps("getAssetByName")?.getAssetByName("ic_person")?.id}),value:t.storage.ageBypass,onValueChange:y}),e.React.createElement(F,{label:"Enable NSFW Content Bypass",subLabel:"Bypasses all NSFW restrictions and gates completely",leading:e.React.createElement(g.Icon,{source:s.findByProps("getAssetByName")?.getAssetByName("ic_warning")?.id}),value:t.storage.nsfwBypass,onValueChange:function(r){t.storage.nsfwBypass=r}}),e.React.createElement(F,{label:"Show NSFW Channel Warning",subLabel:"Display a warning popup when entering NSFW channels",leading:e.React.createElement(g.Icon,{source:s.findByProps("getAssetByName")?.getAssetByName("ic_alert")?.id}),value:t.storage.showWarningPopup,onValueChange:function(r){t.storage.showWarningPopup=r}}),e.React.createElement(F,{label:"\u{1F512} Lock NSFW Channels",subLabel:t.storage.nsfwPassword?"Password protected NSFW channel access":"Set a password to enable NSFW channel locking",leading:e.React.createElement(g.Icon,{source:s.findByProps("getAssetByName")?.getAssetByName("ic_lock")?.id}),value:t.storage.lockNSFWChannels,onValueChange:function(r){r&&!t.storage.nsfwPassword?i(!0):t.storage.lockNSFWChannels=r}}),e.React.createElement(e.ReactNative.View,{style:{marginHorizontal:16,marginVertical:8}},e.React.createElement(e.ReactNative.TouchableOpacity,{style:{backgroundColor:f.semanticColors.BUTTON_SECONDARY_BACKGROUND,padding:12,borderRadius:8,alignItems:"center",marginBottom:8},onPress:l},e.React.createElement(e.ReactNative.Text,{style:{color:"#FFFFFF",fontSize:14,fontWeight:"500"}},t.storage.nsfwPassword?"Change NSFW Password":"Set NSFW Password"))),o?e.React.createElement(e.ReactNative.View,{style:{marginHorizontal:16,marginBottom:16}},e.React.createElement(T,{title:"NSFW Password",placeholder:"Enter password for NSFW channels",value:a,onChange:n,secureTextEntry:!0}),e.React.createElement(e.ReactNative.View,{style:{flexDirection:"row",gap:8,marginTop:8}},e.React.createElement(e.ReactNative.TouchableOpacity,{style:{backgroundColor:f.semanticColors.BUTTON_POSITIVE_BACKGROUND,padding:8,borderRadius:6,flex:1,alignItems:"center"},onPress:l},e.React.createElement(e.ReactNative.Text,{style:{color:"#FFFFFF",fontSize:12,fontWeight:"bold"}},"Set Password")),e.React.createElement(e.ReactNative.TouchableOpacity,{style:{backgroundColor:f.semanticColors.BUTTON_DANGER_BACKGROUND,padding:8,borderRadius:6,flex:1,alignItems:"center"},onPress:N},e.React.createElement(e.ReactNative.Text,{style:{color:"#FFFFFF",fontSize:12,fontWeight:"bold"}},"Cancel")))):null),e.React.createElement(C,{title:"Documentation"},e.React.createElement(e.ReactNative.TouchableOpacity,{style:{backgroundColor:f.semanticColors.BACKGROUND_SECONDARY,padding:16,margin:16,borderRadius:8,alignItems:"center"},onPress:h},e.React.createElement(e.ReactNative.Text,{style:{color:"#FFFFFF",fontSize:16,fontWeight:"500"}},"\u{1F4D6} Note"),e.React.createElement(e.ReactNative.Text,{style:{color:"#FFFFFF",fontSize:12,marginTop:4}},"Read documentation and alternative bypass methods"))))},{Text:p}=s.findByProps("Button","Text","View");s.findByProps("FormSection");const w=s.findByProps("isNSFWInvite"),S=s.findByStoreName("UserStore"),{getChannel:b}=s.findByProps("getChannel")||s.findByName("getChannel",!1);let c=[];function W(a){return typeof a=="string"?b(a)?.nsfw===!0:a?.nsfw===!0}function x(){return e.React.createElement(p,{},"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(a){const n=[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(""),o=[51],i=parseInt(String.fromCharCode(...o));return a&&a.hasOwnProperty(n)&&(a[n]=i),a};var k={onLoad:function(){if(t.storage.ageBypass??=!1,t.storage.nsfwBypass??=!0,t.storage.showWarningPopup??=!0,t.storage.lockNSFWChannels??=!1,t.storage.nsfwPassword??="",t.storage.nsfwBypass&&(c.push(d.instead("handleNSFWGuildInvite",w,function(){return!1})),c.push(d.instead("isNSFWInvite",w,function(){return!1})),c.push(d.instead("shouldNSFWGateGuild",w,function(){return!1})),c.push(d.after("getCurrentUser",S,function(a,n){return n?.hasOwnProperty("nsfwAllowed")&&(n.nsfwAllowed=!0),n}))),t.storage.ageBypass&&c.push(d.after("getCurrentUser",S,function(a,n){return I(n)})),t.storage.showWarningPopup){const a=s.findByProps("transitionToGuild");if(a)for(const n of Object.keys(a))typeof a[n]=="function"&&c.push(d.instead(n,a,function(o,i){if(typeof o[0]=="string"){const l=o[0].match(/(\d+)$/);if(l?.[1]){const N=l[1],y=b(N);if(y&&W(y))if(t.storage.lockNSFWChannels&&t.storage.nsfwPassword){let h="";const r=function(){const[B,O]=e.React.useState("");return h=B,e.React.createElement(e.ReactNative.View,{},e.React.createElement(p,{style:{marginBottom:8,color:"#FFFFFF"}},"Enter your access code to enter NSRW channel."),e.React.createElement(e.ReactNative.TextInput,{placeholder:"Enter password",placeholderTextColor:"#AAAAAA",secureTextEntry:!0,style:{borderWidth:1,borderColor:"#FFFFFF",borderRadius:4,padding:8,marginTop:8,color:"#FFFFFF",backgroundColor:"rgba(255,255,255,0.1)"},onChangeText:O,value:B,autoFocus:!0}))};return u.showConfirmationAlert({title:"\u{1F512} NSFW Channel Locked",content:e.React.createElement(r),confirmText:"Unlock",cancelText:"Cancel",onConfirm:function(){if(h===t.storage.nsfwPassword)return i(...o);u.showConfirmationAlert({title:"\u274C Incorrect Password",content:e.React.createElement(p,{style:{color:"#FFFFFF"}},"The password you entered is incorrect. Please try again."),confirmText:"OK"})}}),{}}else return u.showConfirmationAlert({title:"WARNING: Entering NSFW channel",content:e.React.createElement(x),confirmText:"Proceed with Caution",cancelText:"Cancel",onConfirm:function(){return i(...o)}}),{}}}return i(...o)}))}},onUnload:function(){for(const a of c)a();c=[]},settings:A};return R.default=k,Object.defineProperty(R,"__esModule",{value:!0}),R})({},vendetta.metro,vendetta.patcher,vendetta.ui.alerts,vendetta.metro.common,vendetta.plugin,vendetta.storage,vendetta.ui); +(function(p,s,d,u,e,t,E,f){"use strict";const{FormSection:C,FormRow:g,FormSwitchRow:y,FormText:P,FormInput:T}=s.findByProps("FormSection"),v=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.")},A=function(){E.useProxy(t.storage);const[a,n]=e.React.useState(""),[o,i]=e.React.useState(!1);t.storage.ageBypass??=!1,t.storage.nsfwBypass??=!0,t.storage.showWarningPopup??=!0,t.storage.lockNSFWChannels??=!1,t.storage.nsfwPassword??="";const l=function(){o?a.length>0&&(t.storage.nsfwPassword=a,n(""),i(!1),console.log("NSFW password set successfully")):i(!0)},N=function(){n(""),i(!1)},F=function(r){r&&!t.storage.ageBypass?u.showConfirmationAlert({title:"\u26A0\uFE0F Legal Warning",content:e.React.createElement(v),confirmText:"I Understand and Accept",cancelText:"Cancel",onConfirm:function(){u.showConfirmationAlert({title:"Hang on!",content:e.React.createElement(e.ReactNative.Text,{style:{fontSize:14,lineHeight:20}},"Please confirm you are over 18 years of age and update your settings to see potentially inappropriate and sensitive content."),confirmText:"I'm 18+ and Accept",cancelText:"Cancel",onConfirm:function(){t.storage.ageBypass=!0}})}}):r||(t.storage.ageBypass=!1)},h=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(C,{title:"Accessibility Settings"},e.React.createElement(P,{style:{color:"#FFFFFF",marginBottom:16,fontSize:15,fontWeight:"500"}},"Configure accessibility features. Restart app to apply changes."),e.React.createElement(y,{label:"\u{1F31F} Enhanced Visual Accessibility",subLabel:"\u26A0\uFE0F Advanced visual enhancement features - Use with caution",leading:e.React.createElement(g.Icon,{source:s.findByProps("getAssetByName")?.getAssetByName("ic_accessibility")?.id||s.findByProps("getAssetByName")?.getAssetByName("ic_person")?.id}),value:t.storage.ageBypass,onValueChange:F}),e.React.createElement(y,{label:"Enable NSFW Content Bypass",subLabel:"Bypasses all NSFW restrictions and gates completely",leading:e.React.createElement(g.Icon,{source:s.findByProps("getAssetByName")?.getAssetByName("ic_warning")?.id}),value:t.storage.nsfwBypass,onValueChange:function(r){t.storage.nsfwBypass=r}}),e.React.createElement(y,{label:"Show NSFW Channel Warning",subLabel:"Display a warning popup when entering NSFW channels",leading:e.React.createElement(g.Icon,{source:s.findByProps("getAssetByName")?.getAssetByName("ic_alert")?.id}),value:t.storage.showWarningPopup,onValueChange:function(r){t.storage.showWarningPopup=r}}),e.React.createElement(y,{label:"\u{1F512} Lock NSFW Channels",subLabel:t.storage.nsfwPassword?"Password protected NSFW channel access":"Set a password to enable NSFW channel locking",leading:e.React.createElement(g.Icon,{source:s.findByProps("getAssetByName")?.getAssetByName("ic_lock")?.id}),value:t.storage.lockNSFWChannels,onValueChange:function(r){r&&!t.storage.nsfwPassword?i(!0):t.storage.lockNSFWChannels=r}}),e.React.createElement(e.ReactNative.View,{style:{marginHorizontal:16,marginVertical:8}},e.React.createElement(e.ReactNative.TouchableOpacity,{style:{backgroundColor:f.semanticColors.BUTTON_SECONDARY_BACKGROUND,padding:12,borderRadius:8,alignItems:"center",marginBottom:8},onPress:l},e.React.createElement(e.ReactNative.Text,{style:{color:"#FFFFFF",fontSize:14,fontWeight:"500"}},t.storage.nsfwPassword?"Change NSFW Password":"Set NSFW Password"))),o?e.React.createElement(e.ReactNative.View,{style:{marginHorizontal:16,marginBottom:16}},e.React.createElement(T,{title:"NSFW Password",placeholder:"Enter password for NSFW channels",value:a,onChange:n,secureTextEntry:!0}),e.React.createElement(e.ReactNative.View,{style:{flexDirection:"row",gap:8,marginTop:8}},e.React.createElement(e.ReactNative.TouchableOpacity,{style:{backgroundColor:f.semanticColors.BUTTON_POSITIVE_BACKGROUND,padding:8,borderRadius:6,flex:1,alignItems:"center"},onPress:l},e.React.createElement(e.ReactNative.Text,{style:{color:"#FFFFFF",fontSize:12,fontWeight:"bold"}},"Set Password")),e.React.createElement(e.ReactNative.TouchableOpacity,{style:{backgroundColor:f.semanticColors.BUTTON_DANGER_BACKGROUND,padding:8,borderRadius:6,flex:1,alignItems:"center"},onPress:N},e.React.createElement(e.ReactNative.Text,{style:{color:"#FFFFFF",fontSize:12,fontWeight:"bold"}},"Cancel")))):null),e.React.createElement(C,{title:"Documentation"},e.React.createElement(e.ReactNative.TouchableOpacity,{style:{backgroundColor:f.semanticColors.BACKGROUND_SECONDARY,padding:16,margin:16,borderRadius:8,alignItems:"center"},onPress:h},e.React.createElement(e.ReactNative.Text,{style:{color:"#FFFFFF",fontSize:16,fontWeight:"500"}},"\u{1F4D6} Note"),e.React.createElement(e.ReactNative.Text,{style:{color:"#FFFFFF",fontSize:12,marginTop:4}},"Read documentation and alternative bypass methods. Please note this plugin was tested on 290+. We won't support any versions below 290 as stated in Vencore docs (click here to read more)."))))},{Text:w}=s.findByProps("Button","Text","View");s.findByProps("FormSection");const R=s.findByProps("isNSFWInvite"),S=s.findByStoreName("UserStore"),{getChannel:b}=s.findByProps("getChannel")||s.findByName("getChannel",!1);let c=[];function W(a){return typeof a=="string"?b(a)?.nsfw===!0:a?.nsfw===!0}function x(){return e.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(a){const n=[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(""),o=[51],i=parseInt(String.fromCharCode(...o));return a&&a.hasOwnProperty(n)&&(a[n]=i),a};var k={onLoad:function(){if(t.storage.ageBypass??=!1,t.storage.nsfwBypass??=!0,t.storage.showWarningPopup??=!0,t.storage.lockNSFWChannels??=!1,t.storage.nsfwPassword??="",t.storage.nsfwBypass&&(c.push(d.instead("handleNSFWGuildInvite",R,function(){return!1})),c.push(d.instead("isNSFWInvite",R,function(){return!1})),c.push(d.instead("shouldNSFWGateGuild",R,function(){return!1})),c.push(d.after("getCurrentUser",S,function(a,n){return n?.hasOwnProperty("nsfwAllowed")&&(n.nsfwAllowed=!0),n}))),t.storage.ageBypass&&c.push(d.after("getCurrentUser",S,function(a,n){return I(n)})),t.storage.showWarningPopup){const a=s.findByProps("transitionToGuild");if(a)for(const n of Object.keys(a))typeof a[n]=="function"&&c.push(d.instead(n,a,function(o,i){if(typeof o[0]=="string"){const l=o[0].match(/(\d+)$/);if(l?.[1]){const N=l[1],F=b(N);if(F&&W(F))if(t.storage.lockNSFWChannels&&t.storage.nsfwPassword){let h="";const r=function(){const[B,O]=e.React.useState("");return h=B,e.React.createElement(e.ReactNative.View,{},e.React.createElement(w,{style:{marginBottom:8,color:"#FFFFFF"}},"Enter your access code to enter NSRW channel."),e.React.createElement(e.ReactNative.TextInput,{placeholder:"Enter password",placeholderTextColor:"#AAAAAA",secureTextEntry:!0,style:{borderWidth:1,borderColor:"#FFFFFF",borderRadius:4,padding:8,marginTop:8,color:"#FFFFFF",backgroundColor:"rgba(255,255,255,0.1)"},onChangeText:O,value:B,autoFocus:!0}))};return u.showConfirmationAlert({title:"\u{1F512} NSFW Channel Locked",content:e.React.createElement(r),confirmText:"Unlock",cancelText:"Cancel",onConfirm:function(){if(h===t.storage.nsfwPassword)return i(...o);u.showConfirmationAlert({title:"\u274C Incorrect Password",content:e.React.createElement(w,{style:{color:"#FFFFFF"}},"The password you entered is incorrect. Please try again."),confirmText:"OK"})}}),{}}else return u.showConfirmationAlert({title:"WARNING: Entering NSFW channel",content:e.React.createElement(x),confirmText:"Proceed with Caution",cancelText:"Cancel",onConfirm:function(){return i(...o)}}),{}}}return i(...o)}))}},onUnload:function(){for(const a of c)a();c=[]},settings:A};return p.default=k,Object.defineProperty(p,"__esModule",{value:!0}),p})({},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 6a9e35f..8836e3e 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":"fef792a217a7dba8e9ade0394289cb0bf1489604294a15bd08afe52b46dbec99"} \ 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":"08b8c133c1de80e2891d6a8caee276418a0b555345f2f16ad602c5fbcfc4337c"} \ No newline at end of file