Skip to content

Commit

Permalink
feat(SpotifyIdle): init
Browse files Browse the repository at this point in the history
  • Loading branch information
janisslsm committed Oct 25, 2024
1 parent 578b9f0 commit 6e2eb25
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugins/SpotifyIdle/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
14 changes: 14 additions & 0 deletions plugins/SpotifyIdle/src/index.ts
Original file line number Diff line number Diff line change
@@ -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()
}
}

0 comments on commit 6e2eb25

Please sign in to comment.