From 42034b41b9080b897e11d6f5742248ecef44f809 Mon Sep 17 00:00:00 2001 From: amsyarasyiq Date: Sun, 27 Aug 2023 06:05:16 +0000 Subject: [PATCH] deploy: f1c5709ce9d9d8b843f7dcef536fc4eeb28cba1a --- HoldGIFSend/index.js | 2 +- HoldGIFSend/manifest.json | 2 +- NoAutoReplyMention/index.js | 1 + NoAutoReplyMention/manifest.json | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 NoAutoReplyMention/index.js create mode 100644 NoAutoReplyMention/manifest.json diff --git a/HoldGIFSend/index.js b/HoldGIFSend/index.js index f14aedb..58b4279 100644 --- a/HoldGIFSend/index.js +++ b/HoldGIFSend/index.js @@ -1 +1 @@ -(function(t,e,o){"use strict";const n=e.findByProps("selectGIF"),r=o.instead("selectGIF",n,function(c){let[{url:s}]=c;return n.insertText(s)});return t.onUnload=r,t})({},vendetta.metro,vendetta.patcher); +(function(e,o,c){"use strict";const t=o.findByProps("selectGIF"),r=c.instead("selectGIF",t,function(n){n[1]?n[1]=n[1].url:n[0]=n[0].url,t.insertText(...n)});return e.onUnload=r,e})({},vendetta.metro,vendetta.patcher); diff --git a/HoldGIFSend/manifest.json b/HoldGIFSend/manifest.json index a1ac43d..2de0a65 100644 --- a/HoldGIFSend/manifest.json +++ b/HoldGIFSend/manifest.json @@ -1 +1 @@ -{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"HoldGIFSend","description":"Hold GIF links to chat input before sending them.","vendetta":{"icon":"gif"},"hash":"d74c3ff02cb528ac877375bd3c5b8b3ded6a3ae419e98bec7b92e4549f58417f"} \ No newline at end of file +{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"HoldGIFSend","description":"Hold GIF links to chat input before sending them.","vendetta":{"icon":"gif"},"hash":"3c082ce4efced3cdae6261ee9a17ff5f9c8a06d570c04d54da4eaf0c24b6ac50"} \ No newline at end of file diff --git a/NoAutoReplyMention/index.js b/NoAutoReplyMention/index.js new file mode 100644 index 0000000..d796f9a --- /dev/null +++ b/NoAutoReplyMention/index.js @@ -0,0 +1 @@ +(function(u,b,f,c,e,m,o,v,R,i){"use strict";const h=f.findByStoreName("UserStore"),{FormInput:x,FormDivider:p,FormText:F,FormIcon:d,FormRow:E,FormSection:I,FormSwitchRow:B}=v.Forms,y=e.stylesheet.createThemedStyleSheet({avatar:{height:36,width:36,borderRadius:18},button:{marginRight:12}});function S(l){let{callback:n}=l;return e.React.createElement(i.TouchableOpacity,{onPress:n},e.React.createElement(F,{style:y.button},"ADD"))}function k(l){let{onFinish:n}=l;const[a,r]=R.useState(""),g=function(){!isNaN(parseInt(a))&&h.getUser(a)&&!t.exempted.includes(a)&&(t.exempted=[...t.exempted,a],r("")),n()};return e.React.createElement(E,{leading:e.React.createElement(d,{source:o.getAssetIDByName("ic_add_friend")}),label:e.React.createElement(x,{autoFocus:!0,title:"User ID",placeholder:"123456789012345678",value:a,keyboardType:"numeric",onChangeText:function(s){return r(s.replace(/[^0-9]/g,"").trim())},returnKeyType:"done"}),trailing:e.React.createElement(i.TouchableOpacity,{onPress:g},e.React.createElement(d,{source:o.getAssetIDByName("ic_add_24px")}))})}function w(){m.useProxy(t);const[l,n]=R.useState(!1),a=e.NavigationNative.useNavigation();return R.useEffect(function(){a.setOptions({headerRight:function(){return e.React.createElement(S,{callback:function(){return n(!0)}})}})},[]),e.React.createElement(i.ScrollView,null,e.React.createElement(B,{label:"Enable blacklist mode",subLabel:"If enabled, only users in the exempted list will be affected by the plugin.",leading:e.React.createElement(d,{source:o.getAssetIDByName("ic_block")}),value:t.isBlacklistMode,onValueChange:function(r){return t.isBlacklistMode=r}}),e.React.createElement(I,{title:"Exempted Users"},t.exempted?.length>0&&e.React.createElement(i.FlatList,{data:t.exempted,keyExtractor:function(r){return r},renderItem:function(r){let{item:g}=r;const s=h.getUser(g);if(!s)throw new Error("User not found/is not cached");return e.React.createElement(E,{label:s.username,leading:e.React.createElement(i.Image,{style:y.avatar,source:{uri:s.getAvatarURL()}}),trailing:e.React.createElement(i.TouchableOpacity,{onPress:function(){t.exempted=t.exempted.filter(function(D){return D!==g})}},e.React.createElement(d,{source:o.getAssetIDByName("Small"),disableColor:!0}))})},ItemSeparatorComponent:p}),l&&e.React.createElement(e.React.Fragment,null,e.React.createElement(p,null),e.React.createElement(k,{onFinish:function(){return n(!1)}}))))}c.storage.isBlacklistMode??=!1,c.storage.exempted??=[];const t=c.storage,T=f.findByProps("createPendingReply");var U={settings:w,onUnload:b.patcher.before("createPendingReply",T,function(l){let[n]=l;const a=c.storage.exempted.includes(n.message?.author?.id);n.shouldMention&&=c.storage.isBlacklistMode?!a:a})};return u.default=U,u.settings=t,Object.defineProperty(u,"__esModule",{value:!0}),u})({},vendetta,vendetta.metro,vendetta.plugin,vendetta.metro.common,vendetta.storage,vendetta.ui.assets,vendetta.ui.components,window.React,vendetta.metro.common.ReactNative); diff --git a/NoAutoReplyMention/manifest.json b/NoAutoReplyMention/manifest.json new file mode 100644 index 0000000..cd10763 --- /dev/null +++ b/NoAutoReplyMention/manifest.json @@ -0,0 +1 @@ +{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"NoAutoReplyMention","description":"Turns off auto mention when replying to someone.","vendetta":{"icon":"ic_notif_off"},"hash":"0636f19cce99dbb4b1bacc8577277ea4ed2c6e25fe165491975cdcd6dec92ba7"} \ No newline at end of file