diff --git a/plugins/SpotifyIdle/manifest.json b/plugins/SpotifyIdle/manifest.json new file mode 100644 index 0000000..46eaff9 --- /dev/null +++ b/plugins/SpotifyIdle/manifest.json @@ -0,0 +1,14 @@ +{ + "name": "SpotifyIdle", + "description": "Allows spotify activity to be displayed even while idle.", + "authors": [ + { + "name": "John", + "id": "780819226839220265" + } + ], + "main": "src/index.ts", + "vendetta": { + "icon": "img_account_sync_spotify_light_and_dark" + } +} \ No newline at end of file diff --git a/plugins/SpotifyIdle/src/index.ts b/plugins/SpotifyIdle/src/index.ts new file mode 100644 index 0000000..691cd17 --- /dev/null +++ b/plugins/SpotifyIdle/src/index.ts @@ -0,0 +1,14 @@ +import { findByProps } from "@vendetta/metro" +import { after, instead } from "@vendetta/patcher" +let patches = [] + +export default { + onLoad: () => { + const activityInfo = findByProps("shouldShowActivity"); + + patches.push(instead("shouldShowActivity", activityInfo, () => true)); + }, + onUnload: () => { + for (const unpatch of patches) unpatch() + } +} \ No newline at end of file