-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: bakzkndd <[email protected]> Co-authored-by: Florian Metz <[email protected]> Co-authored-by: Bas van Zanten <[email protected]> Co-authored-by: github plz bring back DarkVIllager <[email protected]> Co-authored-by: Bas van Zanten <[email protected]> Co-authored-by: Daniel Lau <[email protected]>
- Loading branch information
1 parent
8d12d97
commit 665c08b
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"$schema": "https://schemas.premid.app/metadata/1.13", | ||
"apiVersion": 1, | ||
"author": { | ||
"id": "343103632453009408", | ||
"name": "bakzkndd" | ||
}, | ||
"service": "Teckie", | ||
"description": { | ||
"en": "Discover the ultimate partner for all your technology needs at Teckie. We offer a wide range of solutions including refurbished gaming computers, prebuilt systems and custom computers, all created locally in the heart of the Netherlands.", | ||
"nl": "Ontdek de ultieme partner voor al je technologiebehoeften bij Teckie. Wij bieden een breed scala aan oplossingen, waaronder refurbished game computers, prebuilt-systemen en op maat gemaakte computers, allemaal lokaal gecreëerd in het hart van Nederland." | ||
}, | ||
"url": "teckie.nl", | ||
"version": "1.0.0", | ||
"logo": "https://i.imgur.com/DGq6NNv.png", | ||
"thumbnail": "https://i.imgur.com/6jejHTw.png", | ||
"color": "#a859f8", | ||
"category": "other", | ||
"tags": [ | ||
"pc", | ||
"store", | ||
"shopping" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
const presence = new Presence({ | ||
clientId: '576477712470769675', | ||
}) | ||
|
||
enum ActivityAssets { | ||
Logo = 'https://i.imgur.com/DGq6NNv.png', | ||
} | ||
|
||
presence.on('UpdateData', async () => { | ||
const presenceData: PresenceData = { | ||
largeImageKey: ActivityAssets.Logo, | ||
details: 'Bezoekt Teckie', | ||
} | ||
const { pathname } = document.location | ||
|
||
let path = 0 | ||
|
||
switch (pathname.split('/')[1]) { | ||
case 'pages': { | ||
presenceData.details = 'Bekijkt een pagina' | ||
path = 1 | ||
break | ||
} | ||
case 'products': { | ||
presenceData.details = 'Bekijkt een product' | ||
path = 2 | ||
break | ||
} | ||
case 'policies': { | ||
presenceData.details = 'Bekijkt een policy' | ||
path = 2 | ||
break | ||
} | ||
case 'blogs': { | ||
presenceData.details = `Bekijkt een ${pathname.split('/')[2]} blog` | ||
path = 2 | ||
break | ||
} | ||
} | ||
|
||
if (path !== 0) { | ||
presenceData.state = `${path === 1 ? 'Pagina: ' : ''}${document.title.split('– Teckie')?.[0]}` | ||
} | ||
|
||
presence.setActivity(presenceData) | ||
}) |