Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions websites/A/auth's RNG/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://schemas.premid.app/metadata/1.17",
"apiVersion": 1,
"author": {
"id": "1227759305852190801",
"name": "lovelyauth"
},
"service": "auth's RNG",
"description": {
"en": "the greatest RNG webgame of all time. roll, sell, buy, repeat, and customize."
},
"url": "authsrng.xyz",
"regExp": "^https?[:][/][/]([a-z0-9-]+[.])*authsrng[.]xyz[/]",
"version": "1.0.0",
"logo": "https://authsrng.xyz/assets/favicons/android-chrome-512x512.png",
"thumbnail": "https://nightly.authsrng.xyz/assets/promo.png",
"color": "#000000",
"category": "games",
"tags": [
"games"
]
}
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
37 changes: 37 additions & 0 deletions websites/A/auth's RNG/presence.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Assets } from 'premid'

const presence = new Presence({
clientId: '1408180664670359673',
})

const browsingTimestamp = Math.floor(Date.now() / 1000)

enum ActivityAssets {
Logo = 'https://authsrng.xyz/assets/favicons/android-chrome-512x512.png',
}

presence.on('UpdateData', async () => {
const { pathname } = document.location

const presenceData: PresenceData = {
largeImageKey: ActivityAssets.Logo,
smallImageKey: Assets.Play,
startTimestamp: browsingTimestamp,
details: 'auth\'s RNG',
}

if (pathname.includes('leaderboard')) {
presenceData.state = 'viewing leaderboard'
}
else if (pathname.includes('profile')) {
presenceData.state = 'viewing profile'
}
else if (pathname.includes('credits')) {
presenceData.state = 'viewing credits'
}
else {
presenceData.state = 'playing'
}

presence.setActivity(presenceData)
})
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Loading