From 1cc8df937f1f794fa889ac0bf784b06cc516728c Mon Sep 17 00:00:00 2001 From: everestmcarthur Date: Sun, 2 Aug 2026 00:17:23 +0000 Subject: [PATCH] deploy: 46c7baf8b2430f14c4f4c2ac85200b0430b60ae2 --- key-inspector/install/index.js | 18 +++++++++++------- key-inspector/install/manifest.json | 2 +- you-bar-plus/install/index.js | 2 +- you-bar-plus/install/manifest.json | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/key-inspector/install/index.js b/key-inspector/install/index.js index 40e4f9b..fa75cc5 100644 --- a/key-inspector/install/index.js +++ b/key-inspector/install/index.js @@ -1,9 +1,13 @@ -(function(R,n,o,f,S,d){"use strict";const{ScrollView:P,View:T}=n.ReactNative;function v({children:e}){return n.React.createElement(P,{style:{flex:1}},e,n.React.createElement(T,{style:{height:24}}))}const{View:m,Text:E}=n.ReactNative;function w({children:e,style:r}){return n.React.createElement(m,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},r]},n.React.createElement(E,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},e))}const{TouchableOpacity:O,Text:A}=n.ReactNative;function p({label:e,onPress:r,disabled:t,style:u}){return n.React.createElement(O,{disabled:t,onPress:r,style:[{backgroundColor:"#5865F2",borderRadius:8,padding:10,alignItems:"center",opacity:t?.5:1},u]},n.React.createElement(A,{style:{color:"white",fontWeight:"600"}},e))}const k=[{label:'findByProps("computePermissions", "canEveryoneRole")',run:function(){return o.findByProps("computePermissions","canEveryoneRole")}},{label:'findByProps("getBotLabel")',run:function(){return o.findByProps("getBotLabel")}},{label:'findByName("DisplayName", false)',run:function(){return o.findByName("DisplayName",!1)}},{label:'findByName("HeaderName", false)',run:function(){return o.findByName("HeaderName",!1)}},{label:'findByName("getTagProperties", false)',run:function(){return o.findByName("getTagProperties",!1)}},{label:'findByTypeNameAll("UserRow")',run:function(){return o.findByTypeNameAll("UserRow")}},{label:'findByStoreName("ThemeStore")',run:function(){return o.findByStoreName("ThemeStore")}},{label:'findByStoreName("GuildMemberStore")',run:function(){return o.findByStoreName("GuildMemberStore")}},{label:'findByStoreName("GuildStore")',run:function(){return o.findByStoreName("GuildStore")}},{label:'findByStoreName("ChannelStore")',run:function(){return o.findByStoreName("ChannelStore")}},{label:'findByStoreName("UserStore")',run:function(){return o.findByStoreName("UserStore")}},{label:'findByStoreName("RelationshipStore")',run:function(){return o.findByStoreName("RelationshipStore")}},{label:'findByName("RowManager", false)',run:function(){return o.findByName("RowManager",!1)}},{label:'findByProps("TYPING_WRAPPER_HEIGHT")',run:function(){return o.findByProps("TYPING_WRAPPER_HEIGHT")}},{label:'findByName("VoiceUserConnected", false)',run:function(){return o.findByName("VoiceUserConnected",!1)}},{label:"find(resolveSemanticColor via default.internal)",run:function(){return o.find(function(e){return e?.default?.internal?.resolveSemanticColor})}},{label:"find(resolveSemanticColor via meta)",run:function(){return o.find(function(e){return e?.meta?.resolveSemanticColor})}},{label:"find(UserProfile)",run:function(){return o.find(function(e){return e?.type?.name==="UserProfile"})}},{label:'findByName("UserProfileSection", false)',run:function(){return o.findByName("UserProfileSection",!1)}},{label:'findByProps("sendMessage", "sendBotMessage")',run:function(){return o.findByProps("sendMessage","sendBotMessage")}},{label:'findByProps("openLazy", "hideActionSheet")',run:function(){return o.findByProps("openLazy","hideActionSheet")}},{label:'findByProps("push", "pushLazy", "pop")',run:function(){return o.findByProps("push","pushLazy","pop")}},{label:'findByProps("getRenderCloseButton")',run:function(){return o.findByProps("getRenderCloseButton")}},{label:'findByProps("getHeaderCloseButton")',run:function(){return o.findByProps("getHeaderCloseButton")}},{label:'findByName("Navigator")',run:function(){return o.findByName("Navigator")}},{label:'findByName("ThemedRolePill", false)',run:function(){return o.findByName("ThemedRolePill",!1)}},{label:'findByProps("saveProfileChanges")',run:function(){return o.findByProps("saveProfileChanges")}},{label:'findByProps("useAvatarColors")',run:function(){return o.findByProps("useAvatarColors")}},{label:'findByProps("useThemeContext")',run:function(){return o.findByProps("useThemeContext")}},{label:'findByProps("getProfileTheme")',run:function(){return o.findByProps("getProfileTheme")}},{label:'findByProps("ThemeContextProvider")',run:function(){return o.findByProps("ThemeContextProvider")}},{label:"semanticColors.HEADER_SECONDARY",run:function(){return d.semanticColors?.HEADER_SECONDARY}},{label:"semanticColors.BACKGROUND_ACCENT",run:function(){return d.semanticColors?.BACKGROUND_ACCENT}},{label:"semanticColors.BACKGROUND_PRIMARY",run:function(){return d.semanticColors?.BACKGROUND_PRIMARY}},{label:"semanticColors.BACKGROUND_FLOATING",run:function(){return d.semanticColors?.BACKGROUND_FLOATING}},{label:"semanticColors.BUTTON_OUTLINE_BRAND_BORDER_ACTIVE",run:function(){return d.semanticColors?.BUTTON_OUTLINE_BRAND_BORDER_ACTIVE}},{label:"semanticColors.TEXT_NORMAL",run:function(){return d.semanticColors?.TEXT_NORMAL}}];function _(e){if(e==null)return"NOT FOUND";if(typeof e=="object"){const r=Object.keys(e);return`found (${r.length} key${r.length===1?"":"s"})`}return`found (${typeof e})`}function D(){return k.map(function({label:e,run:r}){try{const t=r();return{label:e,found:t!=null,detail:_(t)}}catch(t){return{label:e,found:!1,detail:`threw: ${t}`}}})}function U(e){const r=e.filter(function(t){return!t.found});return[`Key Inspector report - ${new Date().toISOString()}`,`${e.length} checked, ${r.length} missing`,"",...e.map(function(t){return`[${t.found?"OK":"MISSING"}] ${t.label} -> ${t.detail}`}),"",`semanticColors keys (${Object.keys(d.semanticColors??{}).length}):`,...Object.keys(d.semanticColors??{}).sort(),"",`rawColors keys (${Object.keys(d.rawColors??{}).length}):`,...Object.keys(d.rawColors??{}).sort()].join(` -`)}const I=new Set(["vendetta.metro.modules"]);function F(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?`array(${e.length})`:typeof e}function j(e=3){const r=new WeakSet,t=[];function u(i,a,l){if(i==null||typeof i!="object"&&typeof i!="function")return;if(I.has(a)){t.push(`${a} -> (skipped - Discord's full module registry, use the search tools for this)`);return}if(typeof i=="object"){if(r.has(i)){t.push(`${a} -> [already listed elsewhere, circular]`);return}r.add(i)}let s;try{s=Object.keys(i).sort()}catch(g){t.push(`${a} -> [couldn't read keys: ${g}]`);return}const c=s.slice(0,60);for(const g of c){const B=`${a}.${g}`;let N;try{N=i[g]}catch(q){t.push(`${B} -> [threw on access: ${q}]`);continue}const C=F(N);t.push(`${B} (${C})`),C==="object"&&l60&&t.push(`${a} -> (+${s.length-60} more keys not shown at this level)`)}try{u(globalThis.vendetta,"vendetta",0)}catch(i){t.push(`Error walking the vendetta object: ${i}`)}return t.length?t.join(` -`):"vendetta object not found or empty"}function M(e){const r=window?.modules;if(r)for(const t in r){const u=r[t];if(!u?.isInitialized)continue;const i=u.publicModule?.exports;if(i)try{if(e(i))return i;if(i.default!=null&&e(i.default))return i.default}catch{}}}function G(e){return M(function(r){return r?.name===e||r?.displayName===e||r?.type?.name===e||r?.type?.displayName===e})}const H={0:"FunctionComponent",1:"ClassComponent",3:"HostRoot",5:"HostComponent",6:"HostText",7:"Fragment",8:"Mode",9:"ContextConsumer",10:"ContextProvider",11:"ForwardRef",13:"SuspenseComponent",14:"MemoComponent",15:"SimpleMemoComponent"};function L(e){return H[e]??`tag ${e}`}function x(){const e=[`YouBar+ diagnostics - ${new Date().toISOString()}`,""],r=G("YouBarNotificationsButton");e.push(`1. rawFindByTypeName("YouBarNotificationsButton") -> ${r?"FOUND":"NOT FOUND"}`),r&&(e.push(` typeof target = ${typeof r}`),e.push(` has .type (inner render fn) = ${typeof r?.type=="function"}`),e.push(` has .compare = ${"compare"in(r??{})}`),e.push(` $$typeof = ${String(r?.$$typeof??"none")}`)),e.push("");const t=window?.__REACT_DEVTOOLS_GLOBAL_HOOK__;e.push(`2. window.__REACT_DEVTOOLS_GLOBAL_HOOK__ -> ${t?"present":"MISSING"}`),t&&(e.push(` typeof getFiberRoots = ${typeof t.getFiberRoots}`),e.push(` renderers = ${t.renderers?`Map(${t.renderers.size??"?"})`:"MISSING"}`)),e.push("");let u=null;if(t?.getFiberRoots&&t?.renderers?.keys&&r){let a=0;for(const l of t.renderers.keys()){a++;let s;try{s=t.getFiberRoots(l)}catch(c){e.push(`3. renderer ${l}: getFiberRoots threw: ${c}`);continue}if(e.push(`3. renderer ${l}: ${s?s.size:0} fiber root(s)`),s)for(const c of s)u||(u=V(c.current,r))}a===0&&e.push("3. hook.renderers is empty - React never registered with it")}else e.push("3. skipped (no hook, no renderers, or component not found in step 1)");if(e.push(` target fiber found by tree walk -> ${u?"YES":"NO"}`),e.push(""),u){e.push("4. Ancestor chain from target fiber up to root:");let a=u,l=0,s=!1;for(;a&&l<60;){const c=typeof a.stateNode?.forceUpdate=="function";c&&(s=!0),e.push(` [${l}] ${L(a.tag)}${c?" <- has forceUpdate()":""}`),a=a.return,l++}e.push(` class-component ancestor with forceUpdate found -> ${s?"YES":"NO"}`)}else e.push("4. skipped (no fiber found in step 3)");e.push("");const i=o.findByProps("getRootNavigationRef");if(e.push(`5. findByProps("getRootNavigationRef") -> ${i?"FOUND":"NOT FOUND"}`),i)try{const a=i.getRootNavigationRef?.();if(e.push(` getRootNavigationRef() -> ${a?"returned a ref":"null/undefined"}`),a){e.push(` typeof isReady = ${typeof a.isReady}`),e.push(` isReady() = ${function(){try{return a.isReady?.()}catch(s){return`threw: ${s}`}}()}`),e.push(` typeof getCurrentRoute = ${typeof a.getCurrentRoute}`);const l=function(){try{return a.getCurrentRoute?.()}catch{return}}();e.push(` getCurrentRoute() -> ${l?JSON.stringify({name:l.name,params:l.params}):"none"}`),e.push(` typeof navigate = ${typeof a.navigate}`),e.push(` typeof setParams = ${typeof a.setParams}`)}}catch(a){e.push(` threw: ${a}`)}return e.join(` -`)}function V(e,r){const t=e?[e]:[];let u=0;for(;t.length;){if(++u>2e5)return null;const i=t.pop();if(i){if(i.type===r||i.elementType===r)return i;i.child&&t.push(i.child),i.sibling&&t.push(i.sibling)}}return null}const{View:y,Text:b}=n.ReactNative,{FormSection:h,FormInput:$}=S.Forms;function z(){const[e,r]=n.React.useState(null);return n.React.createElement(h,{title:"Full diagnostic scan"},n.React.createElement(y,{style:{paddingHorizontal:16,paddingVertical:8}},n.React.createElement(p,{label:"Run scan & copy full report",onPress:function(){const t=D(),u=t.filter(function(i){return!i.found}).length;n.clipboard.setString(U(t)),r(`${t.length} checked, ${u} missing - full report copied`),f.showToast(`${u} missing out of ${t.length} - report copied`,void 0)}}),e&&n.React.createElement(b,{style:{marginTop:8,fontSize:12.5,opacity:.7}},e)))}function Y(){return n.React.createElement(h,{title:"YouBar+ diagnostics"},n.React.createElement(y,{style:{paddingHorizontal:16,paddingVertical:8}},n.React.createElement(p,{label:"Run YouBar+ diagnostics & copy report",onPress:function(){const e=x();n.clipboard.setString(e),f.showToast("Diagnostics copied - paste into chat",void 0)}}),n.React.createElement(b,{style:{marginTop:8,fontSize:12.5,opacity:.7}},"Checks whether YouBarNotificationsButton can be found live, whether the React DevTools fiber-root registry forceRerender depends on is actually populated, and whether a class-component ancestor or the navigation ref fallback exists at all - run this right after toggling YouBar+ on/off to see exactly which step is failing.")))}function K(){return n.React.createElement(h,{title:"Full Vendetta API tree"},n.React.createElement(y,{style:{paddingHorizontal:16,paddingVertical:8}},n.React.createElement(p,{label:"Copy the entire plugin API tree",onPress:function(){const e=j(3),r=e.split(` -`).length;n.clipboard.setString(e),f.showToast(`Copied ${r} lines - every key path under window.vendetta`,void 0)}}),n.React.createElement(b,{style:{marginTop:8,fontSize:12.5,opacity:.7}},"Every key path under the stable plugin API (window.vendetta), 3 levels deep - this is everything Revenge itself exposes to plugins, not Discord's raw internals (those are searchable individually below, since dumping all of them would be enormous).")))}function W(){const[e,r]=n.React.useState(""),[t,u]=n.React.useState(""),i=function(){const l=e.split(",").map(function(s){return s.trim()}).filter(Boolean);if(l.length)try{const s=o.findByProps(...l);if(!s){n.clipboard.setString(`findByProps(${l.join(", ")}) -> not found`),f.showToast("No module found - copied that result",void 0);return}const c=Object.keys(s).sort();n.clipboard.setString(`findByProps(${l.join(", ")}) -> found, keys: +(function(B,n,a,d,P,f){"use strict";const{ScrollView:v,View:T}=n.ReactNative;function E({children:e}){return n.React.createElement(v,{style:{flex:1}},e,n.React.createElement(T,{style:{height:24}}))}const{View:m,Text:O}=n.ReactNative;function F({children:e,style:t}){return n.React.createElement(m,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},t]},n.React.createElement(O,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},e))}const{TouchableOpacity:k,Text:A}=n.ReactNative;function p({label:e,onPress:t,disabled:r,style:o}){return n.React.createElement(k,{disabled:r,onPress:t,style:[{backgroundColor:"#5865F2",borderRadius:8,padding:10,alignItems:"center",opacity:r?.5:1},o]},n.React.createElement(A,{style:{color:"white",fontWeight:"600"}},e))}const _=[{label:'findByProps("computePermissions", "canEveryoneRole")',run:function(){return a.findByProps("computePermissions","canEveryoneRole")}},{label:'findByProps("getBotLabel")',run:function(){return a.findByProps("getBotLabel")}},{label:'findByName("DisplayName", false)',run:function(){return a.findByName("DisplayName",!1)}},{label:'findByName("HeaderName", false)',run:function(){return a.findByName("HeaderName",!1)}},{label:'findByName("getTagProperties", false)',run:function(){return a.findByName("getTagProperties",!1)}},{label:'findByTypeNameAll("UserRow")',run:function(){return a.findByTypeNameAll("UserRow")}},{label:'findByStoreName("ThemeStore")',run:function(){return a.findByStoreName("ThemeStore")}},{label:'findByStoreName("GuildMemberStore")',run:function(){return a.findByStoreName("GuildMemberStore")}},{label:'findByStoreName("GuildStore")',run:function(){return a.findByStoreName("GuildStore")}},{label:'findByStoreName("ChannelStore")',run:function(){return a.findByStoreName("ChannelStore")}},{label:'findByStoreName("UserStore")',run:function(){return a.findByStoreName("UserStore")}},{label:'findByStoreName("RelationshipStore")',run:function(){return a.findByStoreName("RelationshipStore")}},{label:'findByName("RowManager", false)',run:function(){return a.findByName("RowManager",!1)}},{label:'findByProps("TYPING_WRAPPER_HEIGHT")',run:function(){return a.findByProps("TYPING_WRAPPER_HEIGHT")}},{label:'findByName("VoiceUserConnected", false)',run:function(){return a.findByName("VoiceUserConnected",!1)}},{label:"find(resolveSemanticColor via default.internal)",run:function(){return a.find(function(e){return e?.default?.internal?.resolveSemanticColor})}},{label:"find(resolveSemanticColor via meta)",run:function(){return a.find(function(e){return e?.meta?.resolveSemanticColor})}},{label:"find(UserProfile)",run:function(){return a.find(function(e){return e?.type?.name==="UserProfile"})}},{label:'findByName("UserProfileSection", false)',run:function(){return a.findByName("UserProfileSection",!1)}},{label:'findByProps("sendMessage", "sendBotMessage")',run:function(){return a.findByProps("sendMessage","sendBotMessage")}},{label:'findByProps("openLazy", "hideActionSheet")',run:function(){return a.findByProps("openLazy","hideActionSheet")}},{label:'findByProps("push", "pushLazy", "pop")',run:function(){return a.findByProps("push","pushLazy","pop")}},{label:'findByProps("getRenderCloseButton")',run:function(){return a.findByProps("getRenderCloseButton")}},{label:'findByProps("getHeaderCloseButton")',run:function(){return a.findByProps("getHeaderCloseButton")}},{label:'findByName("Navigator")',run:function(){return a.findByName("Navigator")}},{label:'findByName("ThemedRolePill", false)',run:function(){return a.findByName("ThemedRolePill",!1)}},{label:'findByProps("saveProfileChanges")',run:function(){return a.findByProps("saveProfileChanges")}},{label:'findByProps("useAvatarColors")',run:function(){return a.findByProps("useAvatarColors")}},{label:'findByProps("useThemeContext")',run:function(){return a.findByProps("useThemeContext")}},{label:'findByProps("getProfileTheme")',run:function(){return a.findByProps("getProfileTheme")}},{label:'findByProps("ThemeContextProvider")',run:function(){return a.findByProps("ThemeContextProvider")}},{label:"semanticColors.HEADER_SECONDARY",run:function(){return f.semanticColors?.HEADER_SECONDARY}},{label:"semanticColors.BACKGROUND_ACCENT",run:function(){return f.semanticColors?.BACKGROUND_ACCENT}},{label:"semanticColors.BACKGROUND_PRIMARY",run:function(){return f.semanticColors?.BACKGROUND_PRIMARY}},{label:"semanticColors.BACKGROUND_FLOATING",run:function(){return f.semanticColors?.BACKGROUND_FLOATING}},{label:"semanticColors.BUTTON_OUTLINE_BRAND_BORDER_ACTIVE",run:function(){return f.semanticColors?.BUTTON_OUTLINE_BRAND_BORDER_ACTIVE}},{label:"semanticColors.TEXT_NORMAL",run:function(){return f.semanticColors?.TEXT_NORMAL}}];function D(e){if(e==null)return"NOT FOUND";if(typeof e=="object"){const t=Object.keys(e);return`found (${t.length} key${t.length===1?"":"s"})`}return`found (${typeof e})`}function j(){return _.map(function({label:e,run:t}){try{const r=t();return{label:e,found:r!=null,detail:D(r)}}catch(r){return{label:e,found:!1,detail:`threw: ${r}`}}})}function U(e){const t=e.filter(function(r){return!r.found});return[`Key Inspector report - ${new Date().toISOString()}`,`${e.length} checked, ${t.length} missing`,"",...e.map(function(r){return`[${r.found?"OK":"MISSING"}] ${r.label} -> ${r.detail}`}),"",`semanticColors keys (${Object.keys(f.semanticColors??{}).length}):`,...Object.keys(f.semanticColors??{}).sort(),"",`rawColors keys (${Object.keys(f.rawColors??{}).length}):`,...Object.keys(f.rawColors??{}).sort()].join(` +`)}const I=new Set(["vendetta.metro.modules"]);function M(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?`array(${e.length})`:typeof e}function z(e=3){const t=new WeakSet,r=[];function o(i,s,u){if(i==null||typeof i!="object"&&typeof i!="function")return;if(I.has(s)){r.push(`${s} -> (skipped - Discord's full module registry, use the search tools for this)`);return}if(typeof i=="object"){if(t.has(i)){r.push(`${s} -> [already listed elsewhere, circular]`);return}t.add(i)}let l;try{l=Object.keys(i).sort()}catch(b){r.push(`${s} -> [couldn't read keys: ${b}]`);return}const c=l.slice(0,60);for(const b of c){const $=`${s}.${b}`;let S;try{S=i[b]}catch(re){r.push(`${$} -> [threw on access: ${re}]`);continue}const C=M(S);r.push(`${$} (${C})`),C==="object"&&u60&&r.push(`${s} -> (+${l.length-60} more keys not shown at this level)`)}try{o(globalThis.vendetta,"vendetta",0)}catch(i){r.push(`Error walking the vendetta object: ${i}`)}return r.length?r.join(` +`):"vendetta object not found or empty"}function y(e){const t=window?.modules;if(t)for(const r in t){const o=t[r];if(!o?.isInitialized)continue;const i=o.publicModule?.exports;if(i)try{if(e(i))return i;if(i.default!=null&&e(i.default))return i.default}catch{}}}function w(e){return y(function(t){return t?.name===e||t?.displayName===e||t?.type?.name===e||t?.type?.displayName===e})}function H(e){return y(function(t){return t?.name===e||t?.displayName===e})}function x(...e){return y(function(t){return e.every(function(r){return t?.[r]!==void 0})})}function G(e){return y(function(t){return typeof t?.getName=="function"&&t.getName.length===0&&t.getName()===e})}const L={0:"FunctionComponent",1:"ClassComponent",3:"HostRoot",5:"HostComponent",6:"HostText",7:"Fragment",8:"Mode",9:"ContextConsumer",10:"ContextProvider",11:"ForwardRef",13:"SuspenseComponent",14:"MemoComponent",15:"SimpleMemoComponent"};function V(e){return L[e]??`tag ${e}`}function Y(){const e=[`YouBar+ diagnostics - ${new Date().toISOString()}`,""],t=w("YouBarNotificationsButton");e.push(`1. rawFindByTypeName("YouBarNotificationsButton") -> ${t?"FOUND":"NOT FOUND"}`),t&&(e.push(` typeof target = ${typeof t}`),e.push(` has .type (inner render fn) = ${typeof t?.type=="function"}`),e.push(` has .compare = ${"compare"in(t??{})}`),e.push(` $$typeof = ${String(t?.$$typeof??"none")}`)),e.push("");const r=window?.__REACT_DEVTOOLS_GLOBAL_HOOK__;e.push(`2. window.__REACT_DEVTOOLS_GLOBAL_HOOK__ -> ${r?"present":"MISSING"}`),r&&(e.push(` typeof getFiberRoots = ${typeof r.getFiberRoots}`),e.push(` renderers = ${r.renderers?`Map(${r.renderers.size??"?"})`:"MISSING"}`)),e.push("");let o=null;if(r?.getFiberRoots&&r?.renderers?.keys&&t){let s=0;for(const u of r.renderers.keys()){s++;let l;try{l=r.getFiberRoots(u)}catch(c){e.push(`3. renderer ${u}: getFiberRoots threw: ${c}`);continue}if(e.push(`3. renderer ${u}: ${l?l.size:0} fiber root(s)`),l)for(const c of l)o||(o=K(c.current,t))}s===0&&e.push("3. hook.renderers is empty - React never registered with it")}else e.push("3. skipped (no hook, no renderers, or component not found in step 1)");if(e.push(` target fiber found by tree walk -> ${o?"YES":"NO"}`),e.push(""),o){e.push("4. Ancestor chain from target fiber up to root:");let s=o,u=0,l=!1;for(;s&&u<60;){const c=typeof s.stateNode?.forceUpdate=="function";c&&(l=!0),e.push(` [${u}] ${V(s.tag)}${c?" <- has forceUpdate()":""}`),s=s.return,u++}e.push(` class-component ancestor with forceUpdate found -> ${l?"YES":"NO"}`)}else e.push("4. skipped (no fiber found in step 3)");e.push("");const i=a.findByProps("getRootNavigationRef");if(e.push(`5. findByProps("getRootNavigationRef") -> ${i?"FOUND":"NOT FOUND"}`),i)try{const s=i.getRootNavigationRef?.();if(e.push(` getRootNavigationRef() -> ${s?"returned a ref":"null/undefined"}`),s){e.push(` typeof isReady = ${typeof s.isReady}`),e.push(` isReady() = ${function(){try{return s.isReady?.()}catch(l){return`threw: ${l}`}}()}`),e.push(` typeof getCurrentRoute = ${typeof s.getCurrentRoute}`);const u=function(){try{return s.getCurrentRoute?.()}catch{return}}();e.push(` getCurrentRoute() -> ${u?JSON.stringify({name:u.name,params:u.params}):"none"}`),e.push(` typeof navigate = ${typeof s.navigate}`),e.push(` typeof setParams = ${typeof s.setParams}`)}}catch(s){e.push(` threw: ${s}`)}return e.join(` +`)}function K(e,t){const r=e?[e]:[];let o=0;for(;r.length;){if(++o>2e5)return null;const i=r.pop();if(i){if(i.type===t||i.elementType===t)return i;i.child&&r.push(i.child),i.sibling&&r.push(i.sibling)}}return null}function W(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="function")return`[Function: ${e.name||"anonymous"}]`;if(typeof e!="object")return String(e);const t=new WeakSet;try{return JSON.stringify(e,function(r,o){if(typeof o=="function")return`[Function: ${o.name||"anonymous"}]`;if(typeof o=="symbol")return o.toString();if(typeof o=="object"&&o!==null){if(t.has(o))return"[Circular]";t.add(o)}return o},2)}catch{try{return`[unserializable object, keys: ${Object.keys(e).join(", ")}]`}catch(r){return`[unserializable, and Object.keys threw: ${r}]`}}}async function J(e){try{const t=await new Function("findByProps","findByName","find","rawFind","rawFindByTypeName","rawFindByProps","rawFindByName","rawFindByStoreName","React","ReactNative","FluxDispatcher","window",`return (async () => { +${e} +})();`)(a.findByProps,a.findByName,a.find,y,w,x,H,G,n.React,n.ReactNative,n.FluxDispatcher,window);return W(t)}catch(t){return`Error: ${t instanceof Error?`${t.message} +${t.stack??""}`:String(t)}`}}const{View:h,Text:g}=n.ReactNative,{FormSection:R,FormInput:N}=P.Forms;function X(){const[e,t]=n.React.useState(null);return n.React.createElement(R,{title:"Full diagnostic scan"},n.React.createElement(h,{style:{paddingHorizontal:16,paddingVertical:8}},n.React.createElement(p,{label:"Run scan & copy full report",onPress:function(){const r=j(),o=r.filter(function(i){return!i.found}).length;n.clipboard.setString(U(r)),t(`${r.length} checked, ${o} missing - full report copied`),d.showToast(`${o} missing out of ${r.length} - report copied`,void 0)}}),e&&n.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},e)))}function q(){return n.React.createElement(R,{title:"YouBar+ diagnostics"},n.React.createElement(h,{style:{paddingHorizontal:16,paddingVertical:8}},n.React.createElement(p,{label:"Run YouBar+ diagnostics & copy report",onPress:function(){const e=Y();n.clipboard.setString(e),d.showToast("Diagnostics copied - paste into chat",void 0)}}),n.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},"Checks whether YouBarNotificationsButton can be found live, whether the React DevTools fiber-root registry forceRerender depends on is actually populated, and whether a class-component ancestor or the navigation ref fallback exists at all - run this right after toggling YouBar+ on/off to see exactly which step is failing.")))}function Q(){const[e,t]=n.React.useState(""),[r,o]=n.React.useState(null),[i,s]=n.React.useState(!1),u=async function(){if(!(!e.trim()||i)){s(!0);try{const l=await J(e);o(l),n.clipboard.setString(l),d.showToast("Result copied",void 0)}finally{s(!1)}}};return n.React.createElement(R,{title:"Eval"},n.React.createElement(h,{style:{paddingHorizontal:16,paddingVertical:8}},n.React.createElement(N,{title:"Code",placeholder:'e.g. return findByProps("getRootNavigationRef")',value:e,onChange:t,multiline:!0}),n.React.createElement(p,{label:i?"Running...":"Run & copy result",style:{marginTop:8},disabled:i,onPress:u}),r!=null&&n.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.85},selectable:!0},r.length>2e3?`${r.slice(0,2e3)} +... (truncated, full result copied)`:r),n.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},"Runs as the body of an async function - a bare expression, `return ...`, or `await ...` all work. findByProps/findByName/find, the raw* passive variants (rawFind/rawFindByTypeName/rawFindByProps/rawFindByName/rawFindByStoreName), React, ReactNative, FluxDispatcher, and window are already in scope. Nothing runs until you tap the button.")))}function Z(){return n.React.createElement(R,{title:"Full Vendetta API tree"},n.React.createElement(h,{style:{paddingHorizontal:16,paddingVertical:8}},n.React.createElement(p,{label:"Copy the entire plugin API tree",onPress:function(){const e=z(3),t=e.split(` +`).length;n.clipboard.setString(e),d.showToast(`Copied ${t} lines - every key path under window.vendetta`,void 0)}}),n.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},"Every key path under the stable plugin API (window.vendetta), 3 levels deep - this is everything Revenge itself exposes to plugins, not Discord's raw internals (those are searchable individually below, since dumping all of them would be enormous).")))}function ee(){const[e,t]=n.React.useState(""),[r,o]=n.React.useState(""),i=function(){const u=e.split(",").map(function(l){return l.trim()}).filter(Boolean);if(u.length)try{const l=a.findByProps(...u);if(!l){n.clipboard.setString(`findByProps(${u.join(", ")}) -> not found`),d.showToast("No module found - copied that result",void 0);return}const c=Object.keys(l).sort();n.clipboard.setString(`findByProps(${u.join(", ")}) -> found, keys: ${c.join(` -`)}`),f.showToast(`Found it - copied ${c.length} key(s)`,void 0)}catch(s){n.clipboard.setString(`Error searching for ${l.join(", ")}: ${s}`),f.showToast("Search failed - copied the error instead",void 0)}},a=function(){const l=t.trim();if(l)try{const s=o.findByName(l,!1);if(!s){n.clipboard.setString(`findByName("${l}") -> not found`),f.showToast("No component found - copied that result",void 0);return}const c=Object.keys(s).sort();n.clipboard.setString(`findByName("${l}") -> found, keys: +`)}`),d.showToast(`Found it - copied ${c.length} key(s)`,void 0)}catch(l){n.clipboard.setString(`Error searching for ${u.join(", ")}: ${l}`),d.showToast("Search failed - copied the error instead",void 0)}},s=function(){const u=r.trim();if(u)try{const l=a.findByName(u,!1);if(!l){n.clipboard.setString(`findByName("${u}") -> not found`),d.showToast("No component found - copied that result",void 0);return}const c=Object.keys(l).sort();n.clipboard.setString(`findByName("${u}") -> found, keys: ${c.join(` -`)}`),f.showToast(`Found it - copied ${c.length} key(s)`,void 0)}catch(s){n.clipboard.setString(`Error searching for "${l}": ${s}`),f.showToast("Search failed - copied the error instead",void 0)}};return n.React.createElement(h,{title:"One-off search"},n.React.createElement(y,{style:{paddingHorizontal:16,paddingVertical:8}},n.React.createElement($,{title:"findByProps - comma-separated prop names",placeholder:"e.g. sendMessage, sendBotMessage",value:e,onChange:r}),n.React.createElement(p,{label:"Search & copy result",style:{marginTop:8,marginBottom:16},onPress:i}),n.React.createElement($,{title:"findByName - component name",placeholder:"e.g. ThemedRolePill",value:t,onChange:u}),n.React.createElement(p,{label:"Search & copy result",style:{marginTop:8},onPress:a})))}function X(){return n.React.createElement(v,null,n.React.createElement(z,null),n.React.createElement(Y,null),n.React.createElement(K,null),n.React.createElement(W,null),n.React.createElement(w,null,"The full scan checks every internal lookup this repo's plugins depend on (plus a few for plugins currently being fixed) in one pass, and includes the complete list of semanticColors/rawColors keys at the end. Paste the report back into chat when reporting a bug - it tells us exactly what's missing on your Discord version."))}var J={settings:X};return R.default=J,Object.defineProperty(R,"__esModule",{value:!0}),R})({},vendetta.metro.common,vendetta.metro,vendetta.ui.toasts,vendetta.ui.components,vendetta.ui); +`)}`),d.showToast(`Found it - copied ${c.length} key(s)`,void 0)}catch(l){n.clipboard.setString(`Error searching for "${u}": ${l}`),d.showToast("Search failed - copied the error instead",void 0)}};return n.React.createElement(R,{title:"One-off search"},n.React.createElement(h,{style:{paddingHorizontal:16,paddingVertical:8}},n.React.createElement(N,{title:"findByProps - comma-separated prop names",placeholder:"e.g. sendMessage, sendBotMessage",value:e,onChange:t}),n.React.createElement(p,{label:"Search & copy result",style:{marginTop:8,marginBottom:16},onPress:i}),n.React.createElement(N,{title:"findByName - component name",placeholder:"e.g. ThemedRolePill",value:r,onChange:o}),n.React.createElement(p,{label:"Search & copy result",style:{marginTop:8},onPress:s})))}function te(){return n.React.createElement(E,null,n.React.createElement(X,null),n.React.createElement(q,null),n.React.createElement(Q,null),n.React.createElement(Z,null),n.React.createElement(ee,null),n.React.createElement(F,null,"The full scan checks every internal lookup this repo's plugins depend on (plus a few for plugins currently being fixed) in one pass, and includes the complete list of semanticColors/rawColors keys at the end. Paste the report back into chat when reporting a bug - it tells us exactly what's missing on your Discord version."))}var ne={settings:te};return B.default=ne,Object.defineProperty(B,"__esModule",{value:!0}),B})({},vendetta.metro.common,vendetta.metro,vendetta.ui.toasts,vendetta.ui.components,vendetta.ui); diff --git a/key-inspector/install/manifest.json b/key-inspector/install/manifest.json index a79b755..8da26d4 100644 --- a/key-inspector/install/manifest.json +++ b/key-inspector/install/manifest.json @@ -1 +1 @@ -{"name":"Key Inspector","description":"Dev utility: copies live Discord/Revenge color token keys to your clipboard, for diagnosing plugin crashes without needing a computer.","authors":[{"name":"everestmcarthur"}],"main":"index.js","hash":"40eeb985bbcefc3815ada9978d3084fef18ccb228ea5416e132cc2df5efce334"} \ No newline at end of file +{"name":"Key Inspector","description":"Dev utility: copies live Discord/Revenge color token keys to your clipboard, for diagnosing plugin crashes without needing a computer.","authors":[{"name":"everestmcarthur"}],"main":"index.js","hash":"01f11ef4106e0ab1fbd2de01c537acfeedd2b5fb0c4c7891718f73f5bf0fd448"} \ No newline at end of file diff --git a/you-bar-plus/install/index.js b/you-bar-plus/install/index.js index f6577c3..6d23a89 100644 --- a/you-bar-plus/install/index.js +++ b/you-bar-plus/install/index.js @@ -1 +1 @@ -(function(h,B,i,y,o,E,g,S,F){"use strict";function N(t,e,r,a){try{return r()}catch(n){return a.error(`[${t}] Failed to apply the "${e}" patch, that surface will be skipped: ${n}`),function(){}}}function P(t,e,r){const a=Object.entries(r).map(function([n,c]){return N(t,n,c,e)});return function(){return a.forEach(function(n){return n()})}}function D(t,e,r=100){let a=!1,n;const c=t();return c?(e(c),{cancel(){}}):(n=setInterval(function(){if(a)return;const u=t();u&&(a=!0,clearInterval(n),e(u))},r),{cancel(){a=!0,n&&clearInterval(n)}})}function I(t){const e=window?.modules;if(e)for(const r in e){const a=e[r];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 _(t){return I(function(e){return e?.name===t||e?.displayName===t||e?.type?.name===t||e?.type?.displayName===t})}function b(t){try{t&&typeof t=="object"&&"compare"in t&&(t.compare=function(){return!1})}catch{}try{const e=window?.__REACT_DEVTOOLS_GLOBAL_HOOK__,r=e?.renderers;if(!e?.getFiberRoots||!r?.keys)return;for(const a of r.keys()){const n=e.getFiberRoots(a);if(n)for(const c of n){const u=M(c.current,t);if(u&&V(u))return}}}catch{}}function M(t,e){const r=t?[t]:[];let a=0;for(;r.length;){if(++a>2e5)return null;const n=r.pop();if(n){if(n.type===e||n.elementType===e)return n;n.child&&r.push(n.child),n.sibling&&r.push(n.sibling)}}return null}function V(t){let e=t;for(;e;){if(typeof e.stateNode?.forceUpdate=="function")return e.stateNode.forceUpdate(),!0;e=e.return}return!1}let l=null,f=null;function p(){l?l():f&&b(f)}function m(){let t=function(){};const e=D(function(){return _("YouBarNotificationsButton")},function(r){t=z(r),f=r,b(r)});return function(){e.cancel(),t(),l=null,f=null}}function z(t){const e=y.findByProps("openUserSettings"),r=y.findByProps("transitionToGuild"),a=g.getAssetIDByName("ChatIcon"),n=g.getAssetIDByName("SettingsIcon");return E.instead("type",t,function(c,u){try{const[,x]=o.React.useReducer(function(j){return~j},0);l=function(){return x()};const s=u(...c);if(!s?.props?.children)return s;const v=s.props.children.type,d=s.props.children.props;return o.React.createElement(o.React.Fragment,null,i.storage.showDMButton&&o.React.createElement(v,{variant:d?.variant||"tertiary",size:d?.size||"sm",icon:a,onPress:function(){return r?.transitionToGuild?.("@me")}}),i.storage.showSettingsButton&&o.React.createElement(v,{variant:d?.variant||"tertiary",size:d?.size||"sm",icon:n,onPress:function(){return e?.openUserSettings?.()}}),s)}catch{return u(...c)}})}const{ScrollView:O,View:T}=o.ReactNative;function Y({children:t}){return o.React.createElement(O,{style:{flex:1}},t,o.React.createElement(T,{style:{height:24}}))}const{View:$,Text:L}=o.ReactNative;function k({children:t,style:e}){return o.React.createElement($,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},e]},o.React.createElement(L,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},t))}const{FormSection:A,FormSwitchRow:w}=F.Forms;function C(){return S.useProxy(i.storage),o.React.useEffect(function(){return function(){return p()}},[]),o.React.createElement(Y,null,o.React.createElement(k,null,"Fork of Purple-EyeZ's YouBar+, ported to Revenge's Vendetta-compat API with a fix for a startup race that could silently skip the button patch for an entire session."),o.React.createElement(A,{title:"Buttons"},o.React.createElement(w,{label:"Direct Messages button",subLabel:"Show the DM button in the YouBar",value:!!i.storage.showDMButton,onValueChange:function(t){i.storage.showDMButton=t,p()}}),o.React.createElement(w,{label:"Settings button",subLabel:"Show the Settings button in the YouBar",value:!!i.storage.showSettingsButton,onValueChange:function(t){i.storage.showSettingsButton=t,p()}})))}let R=function(){};var U={onLoad:function(){i.storage.showDMButton??=!1,i.storage.showSettingsButton??=!0,R=P("YouBar+",B.logger,{"YouBar buttons":m})},onUnload:function(){return R()},settings:C};return h.default=U,Object.defineProperty(h,"__esModule",{value:!0}),h})({},vendetta,vendetta.plugin,vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.ui.assets,vendetta.storage,vendetta.ui.components); +(function(h,b,i,y,r,E,g,S,P){"use strict";function F(t,e,a,o){try{return a()}catch(n){return o.error(`[${t}] Failed to apply the "${e}" patch, that surface will be skipped: ${n}`),function(){}}}function I(t,e,a){const o=Object.entries(a).map(function([n,u]){return F(t,n,u,e)});return function(){return o.forEach(function(n){return n()})}}function D(t,e,a=100){let o=!1,n;const u=t();return u?(e(u),{cancel(){}}):(n=setInterval(function(){if(o)return;const c=t();c&&(o=!0,clearInterval(n),e(c))},a),{cancel(){o=!0,n&&clearInterval(n)}})}function M(t){const e=window?.modules;if(e)for(const a in e){const o=e[a];if(!o?.isInitialized)continue;const n=o.publicModule?.exports;if(n)try{if(t(n))return n;if(n.default!=null&&t(n.default))return n.default}catch{}}}function N(t){return M(function(e){return e?.name===t||e?.displayName===t||e?.type?.name===t||e?.type?.displayName===t})}function v(t){try{t&&typeof t=="object"&&"compare"in t&&(t.compare=function(){return!1})}catch{}}let l=null,f=null;function p(){l?l():f&&v(f)}function z(){let t=function(){};const e=D(function(){return N("YouBarNotificationsButton")},function(a){t=V(a),f=a,v(a)});return function(){e.cancel(),t(),l=null,f=null}}function V(t){const e=y.findByProps("openUserSettings"),a=y.findByProps("transitionToGuild"),o=g.getAssetIDByName("ChatIcon"),n=g.getAssetIDByName("SettingsIcon");return E.instead("type",t,function(u,c){try{const[,L]=r.React.useReducer(function(U){return~U},0);l=function(){return L()};const s=c(...u);if(!s?.props?.children)return s;const R=s.props.children.type,d=s.props.children.props;return r.React.createElement(r.React.Fragment,null,i.storage.showDMButton&&r.React.createElement(R,{variant:d?.variant||"tertiary",size:d?.size||"sm",icon:o,onPress:function(){return a?.transitionToGuild?.("@me")}}),i.storage.showSettingsButton&&r.React.createElement(R,{variant:d?.variant||"tertiary",size:d?.size||"sm",icon:n,onPress:function(){return e?.openUserSettings?.()}}),s)}catch{return c(...u)}})}const{ScrollView:Y,View:$}=r.ReactNative;function m({children:t}){return r.React.createElement(Y,{style:{flex:1}},t,r.React.createElement($,{style:{height:24}}))}const{View:x,Text:C}=r.ReactNative;function T({children:t,style:e}){return r.React.createElement(x,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},e]},r.React.createElement(C,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},t))}const{FormSection:j,FormSwitchRow:w}=P.Forms;function k(){return S.useProxy(i.storage),r.React.useEffect(function(){return function(){return p()}},[]),r.React.createElement(m,null,r.React.createElement(T,null,"Fork of Purple-EyeZ's YouBar+, ported to Revenge's Vendetta-compat API with a fix for a startup race that could silently skip the button patch for an entire session."),r.React.createElement(j,{title:"Buttons"},r.React.createElement(w,{label:"Direct Messages button",subLabel:"Show the DM button in the YouBar",value:!!i.storage.showDMButton,onValueChange:function(t){i.storage.showDMButton=t,p()}}),r.React.createElement(w,{label:"Settings button",subLabel:"Show the Settings button in the YouBar",value:!!i.storage.showSettingsButton,onValueChange:function(t){i.storage.showSettingsButton=t,p()}})))}let B=function(){};var A={onLoad:function(){i.storage.showDMButton??=!1,i.storage.showSettingsButton??=!0,B=I("YouBar+",b.logger,{"YouBar buttons":z})},onUnload:function(){return B()},settings:k};return h.default=A,Object.defineProperty(h,"__esModule",{value:!0}),h})({},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 e186883..46173f2 100644 --- a/you-bar-plus/install/manifest.json +++ b/you-bar-plus/install/manifest.json @@ -1 +1 @@ -{"name":"YouBar+","description":"Adds up to 2 configurable buttons (Direct Messages, Settings, or none) to the YouBar, in whatever order you pick.","authors":[{"name":"everestmcarthur"},{"name":"Purple_Ξye™"}],"main":"index.js","hash":"7c7a9b9ea411a01e6c2a9b8a1ebc4703f4cc4fd3f3ad37144437fd3045d52f61"} \ No newline at end of file +{"name":"YouBar+","description":"Adds up to 2 configurable buttons (Direct Messages, Settings, or none) to the YouBar, in whatever order you pick.","authors":[{"name":"everestmcarthur"},{"name":"Purple_Ξye™"}],"main":"index.js","hash":"ed5316de1defefd80433dac7bc947670300b5086a434dfa8551725a53a354f91"} \ No newline at end of file