From d2484c93f6e62afc92e309e33b6c60134cda91c9 Mon Sep 17 00:00:00 2001 From: amsyarasyiq Date: Thu, 24 Jul 2025 14:28:37 +0000 Subject: [PATCH] deploy: 8c39a1c77c6ed2bcd0ccb93b16608a0d9b836781 --- BetterSpotifyIntegration/index.js | 2 +- BetterSpotifyIntegration/manifest.json | 2 +- Last.fm/index.js | 2 +- Last.fm/manifest.json | 2 +- NoAutoReplyMention/index.js | 2 +- NoAutoReplyMention/manifest.json | 2 +- NoIdle/index.js | 2 +- NoIdle/manifest.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/BetterSpotifyIntegration/index.js b/BetterSpotifyIntegration/index.js index 59a3618..c6b0711 100644 --- a/BetterSpotifyIntegration/index.js +++ b/BetterSpotifyIntegration/index.js @@ -1 +1 @@ -(function(o,i,f,y,m,p,s){"use strict";const g=i.findByProps("useStateFromStores"),d=i.findByStoreName("SpotifyStore"),u=i.findByProps("Sizes","Looks"),v=i.findByProps("play","sync");function S(e){const a=g.useStateFromStores([d],function(){return d.getActivity()?.party?.id}),t=e.isCurrentUser||e.activity?.party?.id===a;return React.createElement(s.View,{pointerEvents:t?"none":"auto"},React.createElement(u,{text:t?"You are already along for this ride":"Listen Along",size:u.Sizes.SMALL,style:{marginTop:12,backgroundColor:e.activityButtonColor,opacity:t?.5:1},renderIcon:function(){return React.createElement(s.Image,{style:{height:16,width:16,marginRight:8,tintColor:"white"},source:p.getAssetIDByName("ic_headphone")})},onPress:function(){return void v.sync(e.activity,e.user.id)}}))}let l;var h={onLoad(){const e=function(){return f.i18n.Messages.USER_ACTIVITY_HEADER_LISTENING?.intlMessage?.format({name:"Spotify"})};l=y.before("default",i.findByName("UserProfileSection",!1),function(a){let[t]=a;if(t.title!==e())return;const c=m.findInReactTree(t.children,function(n){return n?.style?.padding===0}),r=c?.children?.findIndex?.(function(n){return n?.type?.name==="Actions"});if(r&&r!==-1){const n=c.children[r];c.children[r]=React.createElement(React.Fragment,null,n,React.createElement(S,n.props))}})},onUnload(){l?.()}};return o.default=h,Object.defineProperty(o,"__esModule",{value:!0}),o})({},vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.utils,vendetta.ui.assets,vendetta.metro.common.ReactNative); +(function(a,i,l,f,y,m,c){"use strict";const p=i.findByProps("useStateFromStores"),s=i.findByStoreName("SpotifyStore"),d=i.findByProps("Sizes","Looks"),g=i.findByProps("play","sync");function v(e){const r=p.useStateFromStores([s],function(){return s.getActivity()?.party?.id}),t=e.isCurrentUser||e.activity?.party?.id===r;return React.createElement(c.View,{pointerEvents:t?"none":"auto"},React.createElement(d,{text:t?"You are already along for this ride":"Listen Along",size:d.Sizes.SMALL,style:{marginTop:12,backgroundColor:e.activityButtonColor,opacity:t?.5:1},renderIcon:function(){return React.createElement(c.Image,{style:{height:16,width:16,marginRight:8,tintColor:"white"},source:m.getAssetIDByName("ic_headphone")})},onPress:function(){return void g.sync(e.activity,e.user.id)}}))}let u;var S={onLoad(){const e=function(){return l.i18n.Messages.USER_ACTIVITY_HEADER_LISTENING?.intlMessage?.format({name:"Spotify"})};u=f.before("default",i.findByName("UserProfileSection",!1),function([r]){if(r.title!==e())return;const t=y.findInReactTree(r.children,function(n){return n?.style?.padding===0}),o=t?.children?.findIndex?.(function(n){return n?.type?.name==="Actions"});if(o&&o!==-1){const n=t.children[o];t.children[o]=React.createElement(React.Fragment,null,n,React.createElement(v,n.props))}})},onUnload(){u?.()}};return a.default=S,Object.defineProperty(a,"__esModule",{value:!0}),a})({},vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.utils,vendetta.ui.assets,vendetta.metro.common.ReactNative); diff --git a/BetterSpotifyIntegration/manifest.json b/BetterSpotifyIntegration/manifest.json index 3f13451..be7bfd7 100644 --- a/BetterSpotifyIntegration/manifest.json +++ b/BetterSpotifyIntegration/manifest.json @@ -1 +1 @@ -{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"BetterSpotifyIntegration","description":"Shrimply better integration with Spotify","vendetta":{},"hash":"2ab21d2e59c1d939684c334b09778068721242b5f01c22f97f9028fded60937e"} \ No newline at end of file +{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"BetterSpotifyIntegration","description":"Shrimply better integration with Spotify","vendetta":{},"hash":"17b87ab5ceb755b2574636d166d9315c859363d0cf9029dcca3f1aa14cf434dc"} \ No newline at end of file diff --git a/Last.fm/index.js b/Last.fm/index.js index 73765b6..6add15e 100644 --- a/Last.fm/index.js +++ b/Last.fm/index.js @@ -1 +1 @@ -(function(f,a,y,D,o,v,S,h,m,_,A){"use strict";const u={DEFAULT_APP_NAME:"Music",DEFAULT_TIME_INTERVAL:5,APPLICATION_ID:"1054951789318909972",LFM_API_KEY:"014ffe8a614370f000d85d95ec30e1be",LFM_DEFAULT_COVER_HASHES:["2a96cbd8b46e442fc41c2b86b821562f","c6f59c1e5e7240a4c0d427abd71f3dbb"]};A.findByProps("SET_ACTIVITY");const F=A.findByProps("getAssetIds"),C=A.findByStoreName("SelfPresenceStore"),k=A.findByStoreName("UserStore");function p(){return w(null)}function w(e){r.pluginStopped&&(g(!0),e=null),r.lastActivity=e,a.FluxDispatcher.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,pid:2312,socketId:"Last.fm@Vendetta"})}async function U(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.APPLICATION_ID;return e?await F.fetchAssetIds(t,e):[]}let R;const L={};function c(e,t){L[e]=t,R?.()}function M(){return[,R]=h.useReducer(function(e){return~e},0),JSON.stringify(L,null,4)}async function O(){const e=new URLSearchParams({method:"user.getrecenttracks",user:s.username,api_key:u.LFM_API_KEY,format:"json",limit:"1",extended:"1"}).toString(),t=await fetch(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw new Error(`Failed to fetch the latest scrobble: ${t.statusText}`);const n=await t.json(),l=n?.recenttracks?.track?.[0];if(c("lastAPIResponse",l),!l)throw n;return{name:l.name,artist:l.artist.name,album:l.album["#text"],albumArt:await V(l.image?.find(function(K){return K.size==="large"})?.["#text"]),url:l.url,date:l.date?.["#text"]??"now",nowPlaying:!!l["@attr"]?.nowplaying,loved:l.loved==="1"}}async function V(e){return u.LFM_DEFAULT_COVER_HASHES.some(function(t){return e.includes(t)})?null:e}var x=function(e){return e[e.PLAYING=0]="PLAYING",e[e.STREAMING=1]="STREAMING",e[e.LISTENING=2]="LISTENING",e[e.COMPETING=5]="COMPETING",e}(x||{});const i=function(){for(var e=arguments.length,t=new Array(e),n=0;n Plugin is unloaded, aborting update()..."),g();return}if(i("--> Fetching last track..."),!s.username)throw S.showToast("Last.fm username is not set!",o.getAssetIDByName("Small")),g(),new Error("Username is not set");if(s.ignoreSpotify)if(C.findActivity(function(n){return n.sync_id})){i("--> Spotify is currently playing, aborting..."),c("isSpotifyIgnored",!0),p();return}else c("isSpotifyIgnored",!1);else c("isSpotifyIgnored",void 0);const e=await O().catch(async function(n){throw i("--> An error occurred while fetching the last track, aborting..."),p(),n});if(c("lastTrack",e),!e.nowPlaying){i("--> Last track is not currently playing, aborting..."),p();return}if(i("--> Track fetched!"),r.lastTrackUrl===e.url){i("--> Last track is the same as the previous one, aborting...");return}const t={name:s.appName||u.DEFAULT_APP_NAME,flags:0,type:s.listeningTo?2:0,details:e.name,state:`by ${e.artist}`,application_id:u.APPLICATION_ID};if(r.lastTrackUrl=e.url,t.name.includes("{{"))for(const n in e)t.name=t.name.replace(`{{${n}}}`,e[n]);if(s.showTimestamp&&(t.timestamps={start:Date.now()|0}),e.album){const n=await U([e.albumArt]);t.assets={large_image:n[0],large_text:`on ${e.album}`}}i("--> Setting activity..."),c("lastActivity",t),i(t);try{w(t)}catch(n){throw i("--> An error occurred while setting the activity"),p(),n}i("--> Successfully set activity!")}function g(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;r.lastActivity=null,r.lastTrackUrl=null,r.updateInterval&&clearInterval(r.updateInterval),!e&&p()}async function b(){if(r.pluginStopped)throw new Error("Plugin is already stopped!");g();let e=0;await P().catch(function(t){console.error(t),e++}),r.updateInterval=setInterval(function(){return P().then(function(){e=0}).catch(function(t){console.error(t),++e>3&&(console.error("Failed to fetch/set activity 3 times, aborting..."),g())})},(Number(s.timeInterval)||u.DEFAULT_TIME_INTERVAL)*1e3)}const r={};_.plugin.storage.ignoreSpotify??=!0;const s={..._.plugin.storage};var B={settings:h.lazy(function(){return Promise.resolve().then(function(){return H})}),onLoad(){if(r.pluginStopped=!1,k.getCurrentUser())b().catch(console.error);else{const e=function(){b().catch(console.error),a.FluxDispatcher.unsubscribe(e)};a.FluxDispatcher.subscribe("CONNECTION_OPEN",e)}},onUnload(){r.pluginStopped=!0,g()}};const{FormRow:N,FormInput:I,FormDivider:d,FormSwitchRow:T,FormText:G,FormIcon:E}=v.Forms;function $(){async function e(){for(const t in y.storage)y.storage[t]!=null&&(s[t]=y.storage[t]);await b(),S.showToast("Settings updated!",o.getAssetIDByName("Check"))}return a.React.createElement(m.TouchableOpacity,{onPress:e},a.React.createElement(G,{style:{marginRight:12}},"UPDATE"))}var z=a.React.memo(function(){const e=D.useProxy(y.storage),t=a.NavigationNative.useNavigation();return h.useEffect(function(){t.setOptions({title:"Last.fm Configuration",headerRight:$})},[]),a.React.createElement(m.ScrollView,null,a.React.createElement(I,{value:e.appName||void 0,onChangeText:function(n){return e.appName=n.trim()},title:"Discord Application Name",placeholder:u.DEFAULT_APP_NAME,returnKeyType:"done"}),a.React.createElement(d,null),a.React.createElement(I,{required:!0,value:e.username||void 0,onChangeText:function(n){return e.username=n.trim()},title:"Last.fm username",helpText:!e.username&&a.React.createElement(m.Text,{style:{color:"#FF0000"}},"This field is required!"),placeholder:"wumpus123",returnKeyType:"done"}),a.React.createElement(d,null),a.React.createElement(I,{value:e.timeInterval,onChangeText:function(n){return e.timeInterval=n},title:"Update interval (in seconds)",placeholder:u.DEFAULT_TIME_INTERVAL.toString(),keyboardType:"numeric",returnKeyType:"done"}),a.React.createElement(d,null),a.React.createElement(T,{label:"Show time elapsed",subLabel:"Show the time elapsed since the song started playing",leading:a.React.createElement(E,{source:o.getAssetIDByName("clock")}),value:e.showTimestamp,onValueChange:function(n){return e.showTimestamp=n}}),a.React.createElement(d,null),a.React.createElement(T,{label:"Set status as listening",subLabel:'Set your status as "Listening to" instead of "Playing"',leading:a.React.createElement(E,{source:o.getAssetIDByName("ic_headset_neutral")}),value:e.listeningTo,onValueChange:function(n){return e.listeningTo=n}}),a.React.createElement(d,null),a.React.createElement(T,{label:"Hide when Spotify is running",subLabel:"Hide the status when a Spotify activity is detected",leading:a.React.createElement(E,{source:o.getAssetIDByName("img_account_sync_spotify_light_and_dark")}),value:e.ignoreSpotify,onValueChange:function(n){return e.ignoreSpotify=n}}),a.React.createElement(d,null),a.React.createElement(N,{label:"Debug",subLabel:"View debug information",leading:a.React.createElement(E,{source:o.getAssetIDByName("debug")}),trailing:N.Arrow,onPress:function(){t.push("VendettaCustomPage",{title:"Debug",render:h.lazy(function(){return Promise.resolve().then(function(){return j})})})}}))}),H=Object.freeze({__proto__:null,default:z});function Y(){const e=M();return React.createElement(m.ScrollView,null,React.createElement(v.Codeblock,{selectable:!0,style:{margin:12}},e))}var j=Object.freeze({__proto__:null,default:Y});return f.currentSettings=s,f.default=B,f.pluginState=r,Object.defineProperty(f,"__esModule",{value:!0}),f})({},vendetta.metro.common,vendetta.plugin,vendetta.storage,vendetta.ui.assets,vendetta.ui.components,vendetta.ui.toasts,window.React,vendetta.metro.common.ReactNative,vendetta,vendetta.metro); +(function(g,n,y,D,o,S,_,h,m,v,E){"use strict";const c={DEFAULT_APP_NAME:"Music",DEFAULT_TIME_INTERVAL:5,APPLICATION_ID:"1054951789318909972",LFM_API_KEY:"014ffe8a614370f000d85d95ec30e1be",LFM_DEFAULT_COVER_HASHES:["2a96cbd8b46e442fc41c2b86b821562f","c6f59c1e5e7240a4c0d427abd71f3dbb"]};E.findByProps("SET_ACTIVITY");const F=E.findByProps("getAssetIds"),C=E.findByStoreName("SelfPresenceStore"),k=E.findByStoreName("UserStore");function p(){return w(null)}function w(e){r.pluginStopped&&(d(!0),e=null),r.lastActivity=e,n.FluxDispatcher.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,pid:2312,socketId:"Last.fm@Vendetta"})}async function U(e,t=c.APPLICATION_ID){return e?await F.fetchAssetIds(t,e):[]}let R;const L={};function u(e,t){L[e]=t,R?.()}function M(){return[,R]=h.useReducer(function(e){return~e},0),JSON.stringify(L,null,4)}async function O(){const e=new URLSearchParams({method:"user.getrecenttracks",user:s.username,api_key:c.LFM_API_KEY,format:"json",limit:"1",extended:"1"}).toString(),t=await fetch(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw new Error(`Failed to fetch the latest scrobble: ${t.statusText}`);const a=await t.json(),l=a?.recenttracks?.track?.[0];if(u("lastAPIResponse",l),!l)throw a;return{name:l.name,artist:l.artist.name,album:l.album["#text"],albumArt:await V(l.image?.find(function(K){return K.size==="large"})?.["#text"]),url:l.url,date:l.date?.["#text"]??"now",nowPlaying:!!l["@attr"]?.nowplaying,loved:l.loved==="1"}}async function V(e){return c.LFM_DEFAULT_COVER_HASHES.some(function(t){return e.includes(t)})?null:e}var x=function(e){return e[e.PLAYING=0]="PLAYING",e[e.STREAMING=1]="STREAMING",e[e.LISTENING=2]="LISTENING",e[e.COMPETING=5]="COMPETING",e}(x||{});const i=function(...e){return s.verboseLogging&&console.log(...e)};async function P(){if(r.pluginStopped){i("--> Plugin is unloaded, aborting update()..."),d();return}if(i("--> Fetching last track..."),!s.username)throw _.showToast("Last.fm username is not set!",o.getAssetIDByName("Small")),d(),new Error("Username is not set");if(s.ignoreSpotify)if(C.findActivity(function(a){return a.sync_id})){i("--> Spotify is currently playing, aborting..."),u("isSpotifyIgnored",!0),p();return}else u("isSpotifyIgnored",!1);else u("isSpotifyIgnored",void 0);const e=await O().catch(async function(a){throw i("--> An error occurred while fetching the last track, aborting..."),p(),a});if(u("lastTrack",e),!e.nowPlaying){i("--> Last track is not currently playing, aborting..."),p();return}if(i("--> Track fetched!"),r.lastTrackUrl===e.url){i("--> Last track is the same as the previous one, aborting...");return}const t={name:s.appName||c.DEFAULT_APP_NAME,flags:0,type:s.listeningTo?2:0,details:e.name,state:`${e.artist}`,status_display_type:1,application_id:c.APPLICATION_ID};if(r.lastTrackUrl=e.url,t.name.includes("{{"))for(const a in e)t.name=t.name.replace(`{{${a}}}`,e[a]);if(s.showTimestamp&&(t.timestamps={start:Date.now()|0}),e.album){const a=await U([e.albumArt]);t.assets={large_image:a[0],large_text:`${e.album}`}}i("--> Setting activity..."),u("lastActivity",t),i(t);try{w(t)}catch(a){throw i("--> An error occurred while setting the activity"),p(),a}i("--> Successfully set activity!")}function d(e=!1){r.lastActivity=null,r.lastTrackUrl=null,r.updateInterval&&clearInterval(r.updateInterval),!e&&p()}async function b(){if(r.pluginStopped)throw new Error("Plugin is already stopped!");d();let e=0;await P().catch(function(t){console.error(t),e++}),r.updateInterval=setInterval(function(){return P().then(function(){e=0}).catch(function(t){console.error(t),++e>3&&(console.error("Failed to fetch/set activity 3 times, aborting..."),d())})},(Number(s.timeInterval)||c.DEFAULT_TIME_INTERVAL)*1e3)}const r={};v.plugin.storage.ignoreSpotify??=!0;const s={...v.plugin.storage};var B={settings:h.lazy(function(){return Promise.resolve().then(function(){return H})}),onLoad(){if(r.pluginStopped=!1,k.getCurrentUser())b().catch(console.error);else{const e=function(){b().catch(console.error),n.FluxDispatcher.unsubscribe(e)};n.FluxDispatcher.subscribe("CONNECTION_OPEN",e)}},onUnload(){r.pluginStopped=!0,d()}};const{FormRow:N,FormInput:I,FormDivider:f,FormSwitchRow:T,FormText:G,FormIcon:A}=S.Forms;function $(){async function e(){for(const t in y.storage)y.storage[t]!=null&&(s[t]=y.storage[t]);await b(),_.showToast("Settings updated!",o.getAssetIDByName("Check"))}return n.React.createElement(m.TouchableOpacity,{onPress:e},n.React.createElement(G,{style:{marginRight:12}},"UPDATE"))}var z=n.React.memo(function(){const e=D.useProxy(y.storage),t=n.NavigationNative.useNavigation();return h.useEffect(function(){t.setOptions({title:"Last.fm Configuration",headerRight:$})},[]),n.React.createElement(m.ScrollView,null,n.React.createElement(I,{value:e.appName||void 0,onChangeText:function(a){return e.appName=a.trim()},title:"Discord Application Name",placeholder:c.DEFAULT_APP_NAME,returnKeyType:"done"}),n.React.createElement(f,null),n.React.createElement(I,{required:!0,value:e.username||void 0,onChangeText:function(a){return e.username=a.trim()},title:"Last.fm username",helpText:!e.username&&n.React.createElement(m.Text,{style:{color:"#FF0000"}},"This field is required!"),placeholder:"wumpus123",returnKeyType:"done"}),n.React.createElement(f,null),n.React.createElement(I,{value:e.timeInterval,onChangeText:function(a){return e.timeInterval=a},title:"Update interval (in seconds)",placeholder:c.DEFAULT_TIME_INTERVAL.toString(),keyboardType:"numeric",returnKeyType:"done"}),n.React.createElement(f,null),n.React.createElement(T,{label:"Show time elapsed",subLabel:"Show the time elapsed since the song started playing",leading:n.React.createElement(A,{source:o.getAssetIDByName("clock")}),value:e.showTimestamp,onValueChange:function(a){return e.showTimestamp=a}}),n.React.createElement(f,null),n.React.createElement(T,{label:"Set status as listening",subLabel:'Set your status as "Listening to" instead of "Playing"',leading:n.React.createElement(A,{source:o.getAssetIDByName("ic_headset_neutral")}),value:e.listeningTo,onValueChange:function(a){return e.listeningTo=a}}),n.React.createElement(f,null),n.React.createElement(T,{label:"Hide when Spotify is running",subLabel:"Hide the status when a Spotify activity is detected",leading:n.React.createElement(A,{source:o.getAssetIDByName("img_account_sync_spotify_light_and_dark")}),value:e.ignoreSpotify,onValueChange:function(a){return e.ignoreSpotify=a}}),n.React.createElement(f,null),n.React.createElement(N,{label:"Debug",subLabel:"View debug information",leading:n.React.createElement(A,{source:o.getAssetIDByName("debug")}),trailing:N.Arrow,onPress:function(){t.push("VendettaCustomPage",{title:"Debug",render:h.lazy(function(){return Promise.resolve().then(function(){return j})})})}}))}),H=Object.freeze({__proto__:null,default:z});function Y(){const e=M();return React.createElement(m.ScrollView,null,React.createElement(S.Codeblock,{selectable:!0,style:{margin:12}},e))}var j=Object.freeze({__proto__:null,default:Y});return g.currentSettings=s,g.default=B,g.pluginState=r,Object.defineProperty(g,"__esModule",{value:!0}),g})({},vendetta.metro.common,vendetta.plugin,vendetta.storage,vendetta.ui.assets,vendetta.ui.components,vendetta.ui.toasts,window.React,vendetta.metro.common.ReactNative,vendetta,vendetta.metro); diff --git a/Last.fm/manifest.json b/Last.fm/manifest.json index 1ab44ad..edf40cd 100644 --- a/Last.fm/manifest.json +++ b/Last.fm/manifest.json @@ -1 +1 @@ -{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"Last.fm","description":"Show off your last.fm status on your Discord profile.","vendetta":{"icon":"ic_stage_music"},"hash":"91dc771b84ace904093fcb77e62eedfbf2ee45d55a026858b493b06c1f9fef14"} \ No newline at end of file +{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"Last.fm","description":"Show off your last.fm status on your Discord profile.","vendetta":{"icon":"ic_stage_music"},"hash":"9ee1221b9446f6bc9aa6109e81660eae7b99d633c8b69c9c1fdc1b5107c1e585"} \ No newline at end of file diff --git a/NoAutoReplyMention/index.js b/NoAutoReplyMention/index.js index d796f9a..559ef3f 100644 --- a/NoAutoReplyMention/index.js +++ b/NoAutoReplyMention/index.js @@ -1 +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); +(function(s,y,R,c,e,b,u,m,g,l){"use strict";const f=R.findByStoreName("UserStore"),{FormInput:v,FormDivider:h,FormText:x,FormIcon:d,FormRow:p,FormSection:F,FormSwitchRow:I}=m.Forms,E=e.stylesheet.createThemedStyleSheet({avatar:{height:36,width:36,borderRadius:18},button:{marginRight:12}});function k({callback:n}){return e.React.createElement(l.TouchableOpacity,{onPress:n},e.React.createElement(x,{style:E.button},"ADD"))}function S({onFinish:n}){const[a,o]=g.useState(""),r=function(){!isNaN(parseInt(a))&&f.getUser(a)&&!t.exempted.includes(a)&&(t.exempted=[...t.exempted,a],o("")),n()};return e.React.createElement(p,{leading:e.React.createElement(d,{source:u.getAssetIDByName("ic_add_friend")}),label:e.React.createElement(v,{autoFocus:!0,title:"User ID",placeholder:"123456789012345678",value:a,keyboardType:"numeric",onChangeText:function(i){return o(i.replace(/[^0-9]/g,"").trim())},returnKeyType:"done"}),trailing:e.React.createElement(l.TouchableOpacity,{onPress:r},e.React.createElement(d,{source:u.getAssetIDByName("ic_add_24px")}))})}function w(){b.useProxy(t);const[n,a]=g.useState(!1),o=e.NavigationNative.useNavigation();return g.useEffect(function(){o.setOptions({headerRight:function(){return e.React.createElement(k,{callback:function(){return a(!0)}})}})},[]),e.React.createElement(l.ScrollView,null,e.React.createElement(I,{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:u.getAssetIDByName("ic_block")}),value:t.isBlacklistMode,onValueChange:function(r){return t.isBlacklistMode=r}}),e.React.createElement(F,{title:"Exempted Users"},t.exempted?.length>0&&e.React.createElement(l.FlatList,{data:t.exempted,keyExtractor:function(r){return r},renderItem:function({item:r}){const i=f.getUser(r);if(!i)throw new Error("User not found/is not cached");return e.React.createElement(p,{label:i.username,leading:e.React.createElement(l.Image,{style:E.avatar,source:{uri:i.getAvatarURL()}}),trailing:e.React.createElement(l.TouchableOpacity,{onPress:function(){t.exempted=t.exempted.filter(function(U){return U!==r})}},e.React.createElement(d,{source:u.getAssetIDByName("Small"),disableColor:!0}))})},ItemSeparatorComponent:h}),n&&e.React.createElement(e.React.Fragment,null,e.React.createElement(h,null),e.React.createElement(S,{onFinish:function(){return a(!1)}}))))}c.storage.isBlacklistMode??=!1,c.storage.exempted??=[];const t=c.storage,B=R.findByProps("createPendingReply");var T={settings:w,onUnload:y.patcher.before("createPendingReply",B,function([n]){const a=c.storage.exempted.includes(n.message?.author?.id);n.shouldMention&&=c.storage.isBlacklistMode?!a:a})};return s.default=T,s.settings=t,Object.defineProperty(s,"__esModule",{value:!0}),s})({},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 index cd10763..fb0dd24 100644 --- a/NoAutoReplyMention/manifest.json +++ b/NoAutoReplyMention/manifest.json @@ -1 +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 +{"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":"0d882ee8d7efd8a700489134d93dff5e71b086947f27f7903470342de1f21bd7"} \ No newline at end of file diff --git a/NoIdle/index.js b/NoIdle/index.js index 42e512e..b70814e 100644 --- a/NoIdle/index.js +++ b/NoIdle/index.js @@ -1 +1 @@ -(function(t,e,n){"use strict";const o=e.patcher.before("dispatch",n.FluxDispatcher,function(c){let[{type:r}]=c;if(r==="IDLE")return[{type:"IDLE",idle:!1}]});return t.onUnload=o,t})({},vendetta,vendetta.metro.common); +(function(t,e,n){"use strict";const o=e.patcher.before("dispatch",n.FluxDispatcher,function([{type:c}]){if(c==="IDLE")return[{type:"IDLE",idle:!1}]});return t.onUnload=o,t})({},vendetta,vendetta.metro.common); diff --git a/NoIdle/manifest.json b/NoIdle/manifest.json index a7c7db8..10000b6 100644 --- a/NoIdle/manifest.json +++ b/NoIdle/manifest.json @@ -1 +1 @@ -{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"NoIdle","description":"Prevent status from idling when Discord is in the background.","vendetta":{"icon":"StatusIdle"},"hash":"477734b6a288567c5ce4439ca1e1dec77b369106ab8ea4993db308bf2261a17c"} \ No newline at end of file +{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"NoIdle","description":"Prevent status from idling when Discord is in the background.","vendetta":{"icon":"StatusIdle"},"hash":"586fb75d5825daaf8c82c8f82a3f949409442f4300d7d4a3453a422457fbe113"} \ No newline at end of file