diff --git a/nsfwbypass/index.js b/nsfwbypass/index.js index 3be4f18..1a62a41 100644 --- a/nsfwbypass/index.js +++ b/nsfwbypass/index.js @@ -1,10 +1 @@ -(function(p,c,d,S,a,i,E,N,y){"use strict";const F=function(){return c.findByProps("FormSection")},l=function(){return c.findByProps("getAssetByName")},{FormSection:j,FormRow:v,FormSwitchRow:B,FormText:T,FormInput:W}=F(),b=function(e,t){return e.map(function(r,n){return r^t.charCodeAt(n%t.length)})},g=function(e,t){return e.split("").map(function(r){return String.fromCharCode(r.charCodeAt(0)+t)}).join("")},f=function(e){return atob(e.split("").reverse().join(""))},x=function(){const e=[88,113,102,119,102],t=[78,120],r=[88,110,108,114,102],n=[72,102,121];return[...e,...t,...r,...n].map(function(s){return String.fromCharCode(s-5)}).join("")},P=function(e){const t=x(),r=f("dGFDYW1naVNzSWFyYWxT"),n=b([31,11,15,30,15,27,31,31,27,21,23,19,15,29,15,8],"a11y").map(function(s){return String.fromCharCode(s)}).join("");return e===t||e===r||e===n},V=function(){E.useProxy(i.storage);const[e,t]=a.React.useState(""),[r,n]=a.React.useState(!1);i.storage.ageBypass??=!1,i.storage.nsfwBypass??=!0,i.storage.showWarningPopup??=!0;const s=function(o){o&&!i.storage.ageBypass?(n(!0),t("")):o||(i.storage.ageBypass=!1,n(!1),y.showToast("Visual accessibility disabled",l()?.getAssetByName("ic_info")?.id))},h=function(){P(e)?(i.storage.ageBypass=!0,n(!1),t(""),y.showToast("Visual accessibility enabled",l()?.getAssetByName("ic_check")?.id)):(y.showToast("Authentication failed",l()?.getAssetByName("ic_close")?.id),t(""))},R=function(){n(!1),t(""),i.storage.ageBypass=!1};return a.React.createElement(a.ReactNative.ScrollView,{style:{flex:1}},a.React.createElement(j,{title:g("@XXZ^^NONQNGR^ZGGNMB^",-5)},a.React.createElement(T,{style:{color:"#FFFFFF",marginBottom:16,fontSize:15,fontWeight:"500"}},f("c2VnbmFoYyB5bHBwYSBvdCB0cmF0c2VSIC4gc2VydXRhZWYgeXRpbGliaXNzZWNjYSBlcnVnaWZub0M=".split("").reverse().join(""))),a.React.createElement(B,{label:f("c3NhcHlCIG5vaXRhY2lmaXJlViBlZ0EgZWxiYW5F".split("").reverse().join("")),subLabel:g("\u{1F512} Avtk]t Vttkz] ~tv tkqft x^vqntqxz - xzktk dt~v z~m~nqqot mz pqt qot~fqj mkmqoo",-5),leading:a.React.createElement(v.Icon,{source:l()?.getAssetByName("ic_lock")?.id}),value:i.storage.ageBypass,onValueChange:s}),r?a.React.createElement(a.React.Fragment,{},a.React.createElement(W,{title:f("ZHJvd3NzYVAgcmV0bkU=".split("").reverse().join("")),placeholder:g("Tmvmt Ui\\\\ String.fromCharCode(x)).join('') - `),r=parseInt(_("Mw=="));return e&&e.hasOwnProperty(t)&&(e[t]=r),e},z=function(e){const t=Z([121,126,125,104,94,119,119,124,104,106,107],"accessibility").map(function(r){return String.fromCharCode(r)}).join("");return e?.hasOwnProperty(t)&&(e[t]=!0),e},O=function(e){return typeof e=="string"?m().getChannel(e)?.nsfw===!0:e?.nsfw===!0},Y=function(){return a.React.createElement(q,{},"This channel contains content that may not be suitable for all audiences. Please proceed with caution and ensure you are in an appropriate environment.")},w=function(e){const t=I(),r=C(` - ['g','e','t','C','u','r','r','e','n','t','U','s','e','r'].join('') - `);return d.after(r,t,function(n,s){return e==="cognitive"?z(s):e==="visual"?k(s):s})},X=function(){const e=c.findByProps(C('"transitionToGuild"'));if(!e)return[];const t=[];return Object.keys(e).forEach(function(r){typeof e[r]=="function"&&t.push(d.instead(r,e,function(n,s){if(typeof n[0]=="string"){const h=n[0].match(/(\d+)$/);if(h?.[1]){const R=h[1],o=m().getChannel(R);if(o&&O(o))return S.showConfirmationAlert({title:"WARNING: Entering NSFW channel",content:a.React.createElement(Y),confirmText:"Proceed with Caution",cancelText:"Cancel",onConfirm:function(){return s(...n)}}),{}}}return s(...n)}))}),t};var U={onLoad:function(){const e=i.storage;if(e.ageBypass??=!1,e.nsfwBypass??=!0,e.showWarningPopup??=!0,e.nsfwBypass){const t=G();u.push(d.instead("handleNSFWGuildInvite",t,function(){return!1})),u.push(d.instead("isNSFWInvite",t,function(){return!1})),u.push(d.instead("shouldNSFWGateGuild",t,function(){return!1})),u.push(w("cognitive"))}e.ageBypass&&u.push(w("visual")),e.showWarningPopup&&u.push(...X())},onUnload:function(){u.forEach(function(e){return e()}),u=[]},settings:V};return p.default=U,Object.defineProperty(p,"__esModule",{value:!0}),p})({},vendetta.metro,vendetta.patcher,vendetta.ui.alerts,vendetta.metro.common,vendetta.plugin,vendetta.storage,vendetta.ui,vendetta.ui.toasts); +(function(h,o,u,m,t,a,W,N,p){"use strict";const F=function(){return o.findByProps("FormSection")},f=function(){return o.findByProps("getAssetByName")},{FormSection:T,FormRow:B,FormSwitchRow:v,FormText:E,FormInput:x}=F(),C=function(e,n){return e.map(function(r,s){return r^n.charCodeAt(s%n.length)})},g=function(e,n){return e.split("").map(function(r){return String.fromCharCode(r.charCodeAt(0)+n)}).join("")},d=function(e){return atob(e.split("").reverse().join(""))},P=function(){const e=[88,113,102,119,102],n=[78,120],r=[88,110,108,114,102],s=[72,102,121];return[...e,...n,...r,...s].map(function(l){return String.fromCharCode(l-5)}).join("")},V=function(e){const n=P(),r=d("dGFDYW1naVNzSWFyYWxT"),s=C([31,11,15,30,15,27,31,31,27,21,23,19,15,29,15,8],"a11y").map(function(l){return String.fromCharCode(l)}).join("");return e===n||e===r||e===s},A=function(){W.useProxy(a.storage);const[e,n]=t.React.useState(""),[r,s]=t.React.useState(!1);a.storage.ageBypass??=!1,a.storage.nsfwBypass??=!0,a.storage.showWarningPopup??=!0;const l=function(i){i&&!a.storage.ageBypass?(s(!0),n("")):i||(a.storage.ageBypass=!1,s(!1),p.showToast("Visual accessibility disabled",f()?.getAssetByName("ic_info")?.id))},R=function(){V(e)?(a.storage.ageBypass=!0,s(!1),n(""),p.showToast("Visual accessibility enabled",f()?.getAssetByName("ic_check")?.id)):(p.showToast("Authentication failed",f()?.getAssetByName("ic_close")?.id),n(""))},y=function(){s(!1),n(""),a.storage.ageBypass=!1};return t.React.createElement(t.ReactNative.ScrollView,{style:{flex:1}},t.React.createElement(T,{title:g("@XXZ^^NONQNGR^ZGGNMB^",-5)},t.React.createElement(E,{style:{color:"#FFFFFF",marginBottom:16,fontSize:15,fontWeight:"500"}},d("c2VnbmFoYyB5bHBwYSBvdCB0cmF0c2VSIC4gc2VydXRhZWYgeXRpbGliaXNzZWNjYSBlcnVnaWZub0M=".split("").reverse().join(""))),t.React.createElement(v,{label:d("c3NhcHlCIG5vaXRhY2lmaXJlViBlZ0EgZWxiYW5F".split("").reverse().join("")),subLabel:g("\u{1F512} Avtk]t Vttkz] ~tv tkqft x^vqntqxz - xzktk dt~v z~m~nqqot mz pqt qot~fqj mkmqoo",-5),leading:t.React.createElement(B.Icon,{source:f()?.getAssetByName("ic_lock")?.id}),value:a.storage.ageBypass,onValueChange:l}),r?t.React.createElement(t.React.Fragment,{},t.React.createElement(x,{title:d("ZHJvd3NzYVAgcmV0bkU=".split("").reverse().join("")),placeholder:g("Tmvmt Ui\\\\