From c338a79392057d9ba7b3927b2e94fc51aeded14b Mon Sep 17 00:00:00 2001 From: everestmcarthur Date: Sun, 2 Aug 2026 00:50:02 +0000 Subject: [PATCH] deploy: 401bb50fec95fab7a05bf29a1a8191f6172261f2 --- 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 c8b2479..60790d3 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. (May require a restart after enabling.)", + "description": "Adds Settings and DM buttons to the YouBar. Toggling while Discord's already running may need one reload to take effect.", "authors": [ "everestmcarthur", "Purple_Ξye™" diff --git a/you-bar-plus/install/index.js b/you-bar-plus/install/index.js index 0f10abd..2260fea 100644 --- a/you-bar-plus/install/index.js +++ b/you-bar-plus/install/index.js @@ -1 +1 @@ -(function(l,B,n,d,t,R,h,b,v){"use strict";function w(e,r,o,i){try{return o()}catch(a){return i.error(`[${e}] Failed to apply the "${r}" patch, that surface will be skipped: ${a}`),function(){}}}function E(e,r,o){const i=Object.entries(o).map(function([a,f]){return w(e,a,f,r)});return function(){return i.forEach(function(a){return a()})}}let u=function(){};function S(){const e=d.findByTypeName("YouBarNotificationsButton"),r=d.findByProps("openUserSettings"),o=d.findByProps("transitionToGuild"),i=h.getAssetIDByName("SettingsIcon"),a=h.getAssetIDByName("ChatIcon");return e?R.instead("type",e,function(f,$){const[,C]=t.React.useReducer(function(L){return~L},0);u=function(){return C()};const s=$(...f);if(!s?.props?.children)return s;const y=s.props.children.type,c=s.props.children.props;return t.React.createElement(t.React.Fragment,null,n.storage.showDMButton&&t.React.createElement(y,{variant:c?.variant||"tertiary",size:c?.size||"sm",icon:a,onPress:function(){o?.transitionToGuild?.("@me")}}),n.storage.showSettingsButton&&t.React.createElement(y,{variant:c?.variant||"tertiary",size:c?.size||"sm",icon:i,onPress:function(){r?.openUserSettings?.()}}),s)}):function(){}}const{ScrollView:P,View:D}=t.ReactNative;function Y({children:e}){return t.React.createElement(P,{style:{flex:1}},e,t.React.createElement(D,{style:{height:24}}))}const{View:M,Text:V}=t.ReactNative;function z({children:e,style:r}){return t.React.createElement(M,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},r]},t.React.createElement(V,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},e))}const{FormSection:F,FormSwitchRow:g}=v.Forms;function N(){return b.useProxy(n.storage),t.React.useEffect(function(){return function(){return u()}},[]),t.React.createElement(Y,null,t.React.createElement(z,null,"Fork of Purple-EyeZ's YouBar+, ported to Revenge's Vendetta-compat API. Like the original, this patches the YouBar the moment it loads - if you enable it while Discord's already running, you may need to restart once for the buttons to appear."),t.React.createElement(F,{title:"Buttons"},t.React.createElement(g,{label:"Direct Messages button",subLabel:"Show the DM button in the YouBar",value:!!n.storage.showDMButton,onValueChange:function(e){n.storage.showDMButton=e,u()}}),t.React.createElement(g,{label:"Settings button",subLabel:"Show the Settings button in the YouBar",value:!!n.storage.showSettingsButton,onValueChange:function(e){n.storage.showSettingsButton=e,u()}})))}let p=function(){};var I={onLoad:function(){n.storage.showDMButton??=!1,n.storage.showSettingsButton??=!0,p=E("YouBar+",B.logger,{"YouBar buttons":S})},onUnload:function(){return p()},settings:N};return l.default=I,Object.defineProperty(l,"__esModule",{value:!0}),l})({},vendetta,vendetta.plugin,vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.ui.assets,vendetta.storage,vendetta.ui.components); +(function(d,b,i,h,r,B,p,v,R){"use strict";function S(t,e,o,a){try{return o()}catch(n){return a.error(`[${t}] Failed to apply the "${e}" patch, that surface will be skipped: ${n}`),function(){}}}function E(t,e,o){const a=Object.entries(o).map(function([n,u]){return S(t,n,u,e)});return function(){return a.forEach(function(n){return n()})}}function I(t,e,o=100){let a=!1,n;const u=t();return u?(e(u),{cancel(){}}):(n=setInterval(function(){if(a)return;const l=t();l&&(a=!0,clearInterval(n),e(l))},o),{cancel(){a=!0,n&&clearInterval(n)}})}function P(t){const e=window?.modules;if(e)for(const o in e){const a=e[o];if(!a?.isInitialized)continue;const n=a.publicModule?.exports;if(n)try{if(t(n))return n;if(n.default!=null&&t(n.default))return n.default}catch{}}}function D(t){return P(function(e){return e?.name===t||e?.displayName===t||e?.type?.name===t||e?.type?.displayName===t})}let c=function(){};function F(){let t=function(){};const e=I(function(){return D("YouBarNotificationsButton")},function(o){t=M(o)});return function(){e.cancel(),t()}}function M(t){const e=h.findByProps("openUserSettings"),o=h.findByProps("transitionToGuild"),a=p.getAssetIDByName("ChatIcon"),n=p.getAssetIDByName("SettingsIcon");return B.instead("type",t,function(u,l){const[,A]=r.React.useReducer(function(L){return~L},0);c=function(){return A()};const s=l(...u);if(!s?.props?.children)return s;const w=s.props.children.type,f=s.props.children.props;return r.React.createElement(r.React.Fragment,null,i.storage.showDMButton&&r.React.createElement(w,{variant:f?.variant||"tertiary",size:f?.size||"sm",icon:a,onPress:function(){o?.transitionToGuild?.("@me")}}),i.storage.showSettingsButton&&r.React.createElement(w,{variant:f?.variant||"tertiary",size:f?.size||"sm",icon:n,onPress:function(){e?.openUserSettings?.()}}),s)})}const{ScrollView:m,View:N}=r.ReactNative;function Y({children:t}){return r.React.createElement(m,{style:{flex:1}},t,r.React.createElement(N,{style:{height:24}}))}const{View:z,Text:V}=r.ReactNative;function $({children:t,style:e}){return r.React.createElement(z,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},e]},r.React.createElement(V,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},t))}const{FormSection:x,FormSwitchRow:y}=R.Forms;function C(){return v.useProxy(i.storage),r.React.useEffect(function(){return function(){return c()}},[]),r.React.createElement(Y,null,r.React.createElement($,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."),r.React.createElement(x,{title:"Buttons"},r.React.createElement(y,{label:"Direct Messages button",subLabel:"Show the DM button in the YouBar",value:!!i.storage.showDMButton,onValueChange:function(t){i.storage.showDMButton=t,c()}}),r.React.createElement(y,{label:"Settings button",subLabel:"Show the Settings button in the YouBar",value:!!i.storage.showSettingsButton,onValueChange:function(t){i.storage.showSettingsButton=t,c()}})))}let g=function(){};var T={onLoad:function(){i.storage.showDMButton??=!1,i.storage.showSettingsButton??=!0,g=E("YouBar+",b.logger,{"YouBar buttons":F})},onUnload:function(){return g()},settings:C};return d.default=T,Object.defineProperty(d,"__esModule",{value:!0}),d})({},vendetta,vendetta.plugin,vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.ui.assets,vendetta.storage,vendetta.ui.components); diff --git a/you-bar-plus/install/manifest.json b/you-bar-plus/install/manifest.json index 93818ab..1e4e6a8 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. (May require a restart after enabling.)","authors":[{"name":"everestmcarthur"},{"name":"Purple_Ξye™"}],"main":"index.js","hash":"7dc56dabb979819b5940681e8812fd01c092a9c717e10268201bc86486b7c905"} \ No newline at end of file +{"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":"13f3ee0a1bd3993a59d1a2b782ffb9833c8f02910074ba6e1ceb333a4d89d9b2"} \ No newline at end of file