From 5a8687686927f3b84bab7a2de18892f5d0400c4e Mon Sep 17 00:00:00 2001 From: everestmcarthur Date: Sun, 2 Aug 2026 01:31:21 +0000 Subject: [PATCH] deploy: 40dd11f004c6ed5d8ff89158c03deec63a7d98ce --- plugins-data.json | 2 +- you-bar-plus/install/index.js | 2 +- you-bar-plus/install/manifest.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins-data.json b/plugins-data.json index 60790d3..68a05c4 100644 --- a/plugins-data.json +++ b/plugins-data.json @@ -195,7 +195,7 @@ { "id": "you-bar-plus", "name": "YouBar+", - "description": "Adds Settings and DM buttons to the YouBar. Toggling while Discord's already running may need one reload to take effect.", + "description": "Adds floating DM/Settings buttons near the bottom of the screen, rendered independently rather than inside the native YouBar row for reliability.", "authors": [ "everestmcarthur", "Purple_Ξye™" diff --git a/you-bar-plus/install/index.js b/you-bar-plus/install/index.js index 3ac8fce..61ec9e8 100644 --- a/you-bar-plus/install/index.js +++ b/you-bar-plus/install/index.js @@ -1 +1 @@ -(function(B,P,s,w,c,Y,R,I,x){"use strict";function F(t,e,a,o){try{return a()}catch(r){return o.error(`[${t}] Failed to apply the "${e}" patch, that surface will be skipped: ${r}`),function(){}}}function M(t,e,a){const o=Object.entries(a).map(function([r,n]){return F(t,r,n,e)});return function(){return o.forEach(function(r){return r()})}}function b(t,e,a=100){let o=!1,r;const n=t();return n?(e(n),{cancel(){}}):(r=setInterval(function(){if(o)return;const u=t();u&&(o=!0,clearInterval(r),e(u))},a),{cancel(){o=!0,r&&clearInterval(r)}})}function E(t){const e=window?.modules;if(e)for(const a in e){const o=e[a];if(!o?.isInitialized)continue;const r=o.publicModule?.exports;if(r)try{if(t(r))return r;if(r.default!=null&&t(r.default))return r.default}catch{}}}function j(t){return E(function(e){return e?.name===t||e?.displayName===t||e?.type?.name===t||e?.type?.displayName===t})}const v=new Map,S=[];let h=[],y=!1;function z(t,e){h.push({predicate:t,onDetected:e})}function V(t){if(h.length===0)return;const e=[];for(const a of h){let o=!1;try{o=a.predicate(t)}catch{}if(o)try{a.onDetected(t)}catch{}else e.push(a)}h=e}function N(t,e){if(V(t),e)for(const{predicate:o,replacement:r}of S)try{if(o(e))return r?{type:r,props:e}:null}catch{}const a=v.get(t);if(a)return{type:a.replacement,props:a.extraProps?{...e,...a.extraProps}:e}}function $(t){if(y)return;const e=c.React.createElement;if(!e){console.warn("[createElementIntercept] React.createElement is null, skipping patch");return}const a=function(n,u,...l){const i=N(n,u);return i===null?null:i?e.call(c.React,i.type,i.props,...l):e.call(c.React,n,u,...l)};Object.assign(a,e),c.React.createElement=a,y=!0;const o=[],r=b(function(){return E(function(n){return typeof n?.jsx=="function"&&typeof n?.jsxs=="function"&&"Fragment"in n})},function(n){for(const u of["jsx","jsxs"]){const l=n[u];typeof l=="function"&&(n[u]=function(i,d,...f){const p=N(i,d);return p===null?null:p?l.call(this,p.type,p.props,...f):l.call(this,i,d,...f)},o.push(function(){n[u]=l}))}});t.push(function(){r.cancel(),y&&(c.React.createElement=e,y=!1),o.forEach(function(n){return n()}),v.clear(),S.length=0,h=[]})}let g=function(){};function C(t){return t?.name==="YouBarNotificationsButton"||t?.displayName==="YouBarNotificationsButton"||t?.type?.name==="YouBarNotificationsButton"||t?.type?.displayName==="YouBarNotificationsButton"}function T(){const t=[];let e=function(){},a=null;function o(n){!n||n===a||(a=n,e=k(n))}$(t),z(C,o);const r=b(function(){return j("YouBarNotificationsButton")},o);return t.push(function(){return r.cancel()}),function(){e(),t.forEach(function(n){return n()})}}function k(t){const e=w.findByProps("openUserSettings"),a=w.findByProps("transitionToGuild"),o=R.getAssetIDByName("ChatIcon"),r=R.getAssetIDByName("SettingsIcon");return Y.instead("type",t,function(n,u){try{const[,l]=c.React.useReducer(function(p){return~p},0);g=function(){return l()};const i=u(...n);if(!i?.props?.children)return i;const d=i.props.children.type,f=i.props.children.props;return c.React.createElement(c.React.Fragment,null,s.storage.showDMButton&&c.React.createElement(d,{variant:f?.variant||"tertiary",size:f?.size||"sm",icon:o,onPress:function(){return a?.transitionToGuild?.("@me")}}),s.storage.showSettingsButton&&c.React.createElement(d,{variant:f?.variant||"tertiary",size:f?.size||"sm",icon:r,onPress:function(){return e?.openUserSettings?.()}}),i)}catch{return u(...n)}})}const{ScrollView:A,View:L}=c.ReactNative;function O({children:t}){return c.React.createElement(A,{style:{flex:1}},t,c.React.createElement(L,{style:{height:24}}))}const{View:U,Text:G}=c.ReactNative;function H({children:t,style:e}){return c.React.createElement(U,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},e]},c.React.createElement(G,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},t))}const{FormSection:_,FormSwitchRow:m}=x.Forms;function W(){return I.useProxy(s.storage),c.React.useEffect(function(){return function(){return g()}},[]),c.React.createElement(O,null,c.React.createElement(H,null,"Fork of Purple-EyeZ's YouBar+, ported to Revenge's Vendetta-compat API, with a fix for a startup race where Metro hadn't always registered the YouBar component yet by the time this patch ran - if you toggle this on while Discord's already running, the buttons should still appear without a restart once they mount, but a fresh reload is the most reliable way to see them."),c.React.createElement(_,{title:"Buttons"},c.React.createElement(m,{label:"Direct Messages button",subLabel:"Show the DM button in the YouBar",value:!!s.storage.showDMButton,onValueChange:function(t){s.storage.showDMButton=t,g()}}),c.React.createElement(m,{label:"Settings button",subLabel:"Show the Settings button in the YouBar",value:!!s.storage.showSettingsButton,onValueChange:function(t){s.storage.showSettingsButton=t,g()}})))}let D=function(){};var Z={onLoad:function(){s.storage.showDMButton??=!1,s.storage.showSettingsButton??=!0,D=M("YouBar+",P.logger,{"YouBar buttons":T})},onUnload:function(){return D()},settings:W};return B.default=Z,Object.defineProperty(B,"__esModule",{value:!0}),B})({},vendetta,vendetta.plugin,vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.ui.assets,vendetta.storage,vendetta.ui.components); +(function(l,h,n,f,e,R,b,u,p,E){"use strict";function S(t,a,r=100){let i=!1,o;const s=t();return s?(a(s),{cancel(){}}):(o=setInterval(function(){if(i)return;const B=t();B&&(i=!0,clearInterval(o),a(B))},r),{cancel(){i=!0,o&&clearInterval(o)}})}function I(t,a=!0){const r=window?.modules;if(r)for(const i in r){const o=r[i];if(o?.__filePath!==t)continue;if(!o.isInitialized)return;const s=o.publicModule?.exports;return s?a?s.default??s:s:void 0}}const{View:m,TouchableOpacity:y,Image:w}=e.ReactNative,D="modules/toast/native/ToastContainer.tsx";function M(){let t=function(){};const a=S(function(){return I(D,!0)},function(r){t=R.after("type",r,function(i,o){return e.React.createElement(e.React.Fragment,null,o,e.React.createElement(P,null))}),p.showToast("YouBar+ ready",u.getAssetIDByName("CheckmarkIcon"))});return function(){a.cancel(),t()}}function P(){if(b.useProxy(n.storage),!n.storage.showDMButton&&!n.storage.showSettingsButton)return null;const t=f.findByProps("openUserSettings"),a=f.findByProps("transitionToGuild"),r=u.getAssetIDByName("ChatIcon"),i=u.getAssetIDByName("SettingsIcon");return e.React.createElement(m,{pointerEvents:"box-none",style:c.container},n.storage.showDMButton&&e.React.createElement(y,{accessibilityLabel:"Direct Messages",onPress:function(){return a?.transitionToGuild?.("@me")},style:c.button},e.React.createElement(w,{source:r,style:c.icon})),n.storage.showSettingsButton&&e.React.createElement(y,{accessibilityLabel:"Settings",onPress:function(){return t?.openUserSettings?.()},style:c.button},e.React.createElement(w,{source:i,style:c.icon})))}const d=40,c={container:{position:"absolute",right:12,bottom:90,flexDirection:"row",alignItems:"center",gap:10,zIndex:999,elevation:999},button:{width:d,height:d,borderRadius:d/2,backgroundColor:"rgba(30,30,35,0.85)",alignItems:"center",justifyContent:"center"},icon:{width:20,height:20,tintColor:"white"}},{ScrollView:x,View:C}=e.ReactNative;function F({children:t}){return e.React.createElement(x,{style:{flex:1}},t,e.React.createElement(C,{style:{height:24}}))}const{View:T,Text:V}=e.ReactNative;function N({children:t,style:a}){return e.React.createElement(T,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},a]},e.React.createElement(V,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},t))}const{FormSection:Y,FormSwitchRow:v}=E.Forms;function $(){return b.useProxy(n.storage),React.createElement(F,null,React.createElement(N,null,"Fork of Purple-EyeZ's YouBar+, rebuilt from scratch after the original approach (patching YouBar's own notification button directly) turned out to be unreliable on current Discord builds. These buttons now render as an independent floating overlay near the bottom-right of the screen instead of natively inside the YouBar row itself - not pixel-identical placement, but should appear reliably and update instantly when toggled, without needing a restart."),React.createElement(Y,{title:"Buttons"},React.createElement(v,{label:"Direct Messages button",subLabel:"Show a floating DM button",value:!!n.storage.showDMButton,onValueChange:function(t){n.storage.showDMButton=t}}),React.createElement(v,{label:"Settings button",subLabel:"Show a floating Settings button",value:!!n.storage.showSettingsButton,onValueChange:function(t){n.storage.showSettingsButton=t}})))}const L="youbar-plus-v2-toast-anchor";let g=function(){};var k={onLoad:function(){n.storage.showDMButton??=!1,n.storage.showSettingsButton??=!0,h.logger.log(`[YouBar+] loading (${L})`);try{g=M()}catch(t){h.logger.error(`[YouBar+] Failed to apply patches, buttons will not appear: ${t}`),g=function(){}}},onUnload:function(){return g()},settings:$};return l.default=k,Object.defineProperty(l,"__esModule",{value:!0}),l})({},vendetta,vendetta.plugin,vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.storage,vendetta.ui.assets,vendetta.ui.toasts,vendetta.ui.components); diff --git a/you-bar-plus/install/manifest.json b/you-bar-plus/install/manifest.json index 14d8c5b..4c24c86 100644 --- a/you-bar-plus/install/manifest.json +++ b/you-bar-plus/install/manifest.json @@ -1 +1 @@ -{"name":"YouBar+","description":"Adds Settings and DM buttons to the YouBar. Toggling while Discord's already running may need one reload to take effect.","authors":[{"name":"everestmcarthur"},{"name":"Purple_Ξye™"}],"main":"index.js","hash":"0a15ad6086a3900b69bd28765484314007962f031c7896c08d6b0849b524697b"} \ No newline at end of file +{"name":"YouBar+","description":"Adds floating DM/Settings buttons near the bottom of the screen, rendered independently rather than inside the native YouBar row for reliability.","authors":[{"name":"everestmcarthur"},{"name":"Purple_Ξye™"}],"main":"index.js","hash":"c16ef7f4b259a8b74c88961ed72fa0c81a6ae90f0b2a84daab4e49d156f56d8e"} \ No newline at end of file