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