From 7a148d11f5bd74381fd009df62a30f5387d766b6 Mon Sep 17 00:00:00 2001 From: Rico040 Date: Mon, 13 May 2024 07:05:05 +0000 Subject: [PATCH] deploy: 1d04807dcf08d5d1998aa7b3a33b9a2bf7a6d5ea --- picture-links/index.js | 2 +- picture-links/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/picture-links/index.js b/picture-links/index.js index 2f3ab43..7683b35 100644 --- a/picture-links/index.js +++ b/picture-links/index.js @@ -1 +1 @@ -(function(v,a,l,h){"use strict";const{Pressable:s}=a.findByProps("Button","Text","View"),y=a.findByName("ProfileBanner",!1),m=a.findByName("HeaderAvatar",!1),B=a.findByName("GuildName",!1),{openMediaModal:S}=a.findByProps("openMediaModal"),{hideActionSheet:P}=a.findByProps("hideActionSheet"),{getChannelId:b}=a.findByStoreName("SelectedChannelStore"),{getGuildId:w}=a.findByStoreName("SelectedGuildStore");function E(i){return new Promise(function(n,e){h.ReactNative.Image.getSize(i,function(t,r){return n({width:t,height:r})},function(t){return e(t)})})}async function u(i,n){const{width:e,height:t}=await E(i);P(),S({initialSources:[{uri:i,sourceURI:i,width:e,height:t,guildId:w(),channelId:b()}],initialIndex:0,originLayout:{width:0,height:0,x:n.pageX,y:n.pageY,resizeMode:"fill"}})}const I=l.after("default",m,function(i,n){let[{user:e,style:t,guildId:r}]=i;var d,o;const c=((d=e.guildMemberAvatars)===null||d===void 0?void 0:d[r])&&`https://cdn.discordapp.com/guilds/${r}/users/${e.id}/avatars/${e.guildMemberAvatars[r]}.png?size=4096`,f=e==null||(o=e.getAvatarURL)===null||o===void 0?void 0:o.call(e,!1,4096,!0);if(!f)return n;const M=typeof f=="number"?`https://cdn.discordapp.com/embed/avatars/${Number(BigInt(e.id)>>22n)%6}.png`:f?.replace(".webp",".png");return delete n.props.style,React.createElement(s,{onPress:function(g){let{nativeEvent:p}=g;return u(M,p)},onLongPress:function(g){let{nativeEvent:p}=g;return c&&u(c,p)},style:t},n)}),$=l.after("default",y,function(i,n){let[{bannerSource:e}]=i;if(typeof e?.uri!="string"||!n)return n;const t=e.uri.replace(/(?:\?size=\d{3,4})?$/,"?size=4096").replace(".webp",".png");return React.createElement(s,{onPress:function(r){let{nativeEvent:d}=r;return u(t,d)}},n)});var z=l.after("default",B,function(i,n){let[{size:e,guild:t}]=i;if(e!=="XLARGE")return;var r="png";t?.icon.includes("a_")&&(r="gif");const d=`https://cdn.discordapp.com/icons/${t?.id}/${t?.icon}.${r}?size=4096`;return React.createElement(s,{onPress:function(o){let{nativeEvent:c}=o;return u(d,c)}},n)});function A(){I(),$(),z()}return v.onUnload=A,v})({},vendetta.metro,vendetta.patcher,vendetta.metro.common); +(function(v,a,l,h){"use strict";const{Pressable:s}=a.findByProps("Button","Text","View"),y=a.findByName("ProfileBanner",!1),m=a.findByName("HeaderAvatar",!1),B=a.findByName("GuildIcon",!1),{openMediaModal:S}=a.findByProps("openMediaModal"),{hideActionSheet:P}=a.findByProps("hideActionSheet"),{getChannelId:b}=a.findByStoreName("SelectedChannelStore"),{getGuildId:I}=a.findByStoreName("SelectedGuildStore");function w(i){return new Promise(function(n,e){h.ReactNative.Image.getSize(i,function(t,r){return n({width:t,height:r})},function(t){return e(t)})})}async function u(i,n){const{width:e,height:t}=await w(i);P(),S({initialSources:[{uri:i,sourceURI:i,width:e,height:t,guildId:I(),channelId:b()}],initialIndex:0,originLayout:{width:0,height:0,x:n.pageX,y:n.pageY,resizeMode:"fill"}})}const E=l.after("default",m,function(i,n){let[{user:e,style:t,guildId:r}]=i;var d,o;const c=((d=e.guildMemberAvatars)===null||d===void 0?void 0:d[r])&&`https://cdn.discordapp.com/guilds/${r}/users/${e.id}/avatars/${e.guildMemberAvatars[r]}.png?size=4096`,f=e==null||(o=e.getAvatarURL)===null||o===void 0?void 0:o.call(e,!1,4096,!0);if(!f)return n;const M=typeof f=="number"?`https://cdn.discordapp.com/embed/avatars/${Number(BigInt(e.id)>>22n)%6}.png`:f?.replace(".webp",".png");return delete n.props.style,React.createElement(s,{onPress:function(g){let{nativeEvent:p}=g;return u(M,p)},onLongPress:function(g){let{nativeEvent:p}=g;return c&&u(c,p)},style:t},n)}),$=l.after("default",y,function(i,n){let[{bannerSource:e}]=i;if(typeof e?.uri!="string"||!n)return n;const t=e.uri.replace(/(?:\?size=\d{3,4})?$/,"?size=4096").replace(".webp",".png");return React.createElement(s,{onPress:function(r){let{nativeEvent:d}=r;return u(t,d)}},n)});var z=l.after("default",B,function(i,n){let[{size:e,guild:t}]=i;if(e!=="XLARGE")return;var r="png";t?.icon.includes("a_")&&(r="gif");const d=`https://cdn.discordapp.com/icons/${t?.id}/${t?.icon}.${r}?size=4096`;return React.createElement(s,{onPress:function(o){let{nativeEvent:c}=o;return u(d,c)}},n)});function A(){E(),$(),z()}return v.onUnload=A,v})({},vendetta.metro,vendetta.patcher,vendetta.metro.common); diff --git a/picture-links/manifest.json b/picture-links/manifest.json index d7566be..b301044 100644 --- a/picture-links/manifest.json +++ b/picture-links/manifest.json @@ -1 +1 @@ -{"name":"Picture Links","description":"Allows you to click on profile pictures and banners.","authors":[{"name":"redstonekasi","id":"265064055490871297"},{"name":"Rico040","id":"619474349845643275"}],"main":"index.js","vendetta":{"icon":"ic_link"},"hash":"952b9aa2c510beb7d56872cd736d620db3a2435d4920849495d3a2aba33ac38c"} \ No newline at end of file +{"name":"Picture Links","description":"Allows you to click on profile pictures and banners.","authors":[{"name":"redstonekasi","id":"265064055490871297"},{"name":"Rico040","id":"619474349845643275"}],"main":"index.js","vendetta":{"icon":"ic_link"},"hash":"ef25ade95247687be8ae2f28990dcd207f969eef168c8a7f1b16d2c29b9d276d"} \ No newline at end of file