-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
132 changed files
with
12,377 additions
and
11,594 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 |
---|---|---|
@@ -1,40 +1,40 @@ | ||
{ | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"name": "Dark_Ville", | ||
"id": "638080361179512853" | ||
}, | ||
"service": "CDKeys", | ||
"description": { | ||
"nl": "Hier bij CDKeys.com zijn we gespecialiseerd in het verstrekken van de beste digitale codes voor de populairste games. Je hoeft niet meer de volle prijs te betalen of te wachten op een spel. Wij combineren de laagste prijzen met een snelle digitale levering, zodat je snel kunt beginnen met het spelen van je favoriete games.", | ||
"en": "Here at CDKeys.com, we specialise in providing you with the best digital codes for the hottest games. There’s no need to pay full price or wait for a game again. We combine the lowest prices with rapid digital delivery, so you can start playing your favourite games, fast." | ||
}, | ||
"url": "www.cdkeys.com", | ||
"version": "1.1.9", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/C/CDKeys/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/C/CDKeys/assets/thumbnail.png", | ||
"color": "#1F143D", | ||
"category": "other", | ||
"tags": [ | ||
"cdkeys", | ||
"games", | ||
"key", | ||
"buy", | ||
"game-key" | ||
], | ||
"settings": [ | ||
{ | ||
"id": "buttons", | ||
"title": "Show Buttons", | ||
"icon": "fas fa-compress-arrows-alt", | ||
"value": true | ||
}, | ||
{ | ||
"id": "cover", | ||
"title": "Show Cover", | ||
"icon": "fad fa-album", | ||
"value": true | ||
} | ||
] | ||
} | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"name": "Dark_Ville", | ||
"id": "638080361179512853" | ||
}, | ||
"service": "CDKeys", | ||
"description": { | ||
"nl": "Hier bij CDKeys.com zijn we gespecialiseerd in het verstrekken van de beste digitale codes voor de populairste games. Je hoeft niet meer de volle prijs te betalen of te wachten op een spel. Wij combineren de laagste prijzen met een snelle digitale levering, zodat je snel kunt beginnen met het spelen van je favoriete games.", | ||
"en": "Here at CDKeys.com, we specialise in providing you with the best digital codes for the hottest games. There’s no need to pay full price or wait for a game again. We combine the lowest prices with rapid digital delivery, so you can start playing your favourite games, fast." | ||
}, | ||
"url": "www.cdkeys.com", | ||
"version": "1.1.9", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/C/CDKeys/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/C/CDKeys/assets/thumbnail.png", | ||
"color": "#1F143D", | ||
"category": "other", | ||
"tags": [ | ||
"cdkeys", | ||
"games", | ||
"key", | ||
"buy", | ||
"game-key" | ||
], | ||
"settings": [ | ||
{ | ||
"id": "buttons", | ||
"title": "Show Buttons", | ||
"icon": "fas fa-compress-arrows-alt", | ||
"value": true | ||
}, | ||
{ | ||
"id": "cover", | ||
"title": "Show Cover", | ||
"icon": "fad fa-album", | ||
"value": true | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1,91 +1,101 @@ | ||
const presence = new Presence({ | ||
clientId: "940892975502856232", | ||
}), | ||
browsingTimestamp = Math.floor(Date.now() / 1000); | ||
clientId: '940892975502856232', | ||
}) | ||
const browsingTimestamp = Math.floor(Date.now() / 1000) | ||
|
||
presence.on("UpdateData", async () => { | ||
const presenceData: PresenceData = { | ||
largeImageKey: | ||
"https://cdn.rcd.gg/PreMiD/websites/C/CDKeys/assets/logo.png", | ||
startTimestamp: browsingTimestamp, | ||
}, | ||
{ pathname, href } = document.location, | ||
[buttons, covers] = await Promise.all([ | ||
presence.getSetting<boolean>("buttons"), | ||
presence.getSetting<boolean>("cover"), | ||
]), | ||
search = document.querySelector<HTMLInputElement>('[id="search"]'), | ||
active = document.querySelector('[class="navigation__link current"]'), | ||
series = document.querySelector( | ||
"#maincontent > div.columns > div > div.wrap.cms-content" | ||
), | ||
game = document.querySelector( | ||
"#maincontent > div.pathname-title-wrapper > h1 > span" | ||
); | ||
if (search?.value) { | ||
presenceData.details = "Searching for"; | ||
presenceData.state = search.value; | ||
presenceData.smallImageKey = Assets.Search; | ||
} else if (game) { | ||
presenceData.buttons = [ | ||
{ | ||
label: "View Game", | ||
url: href, | ||
}, | ||
]; | ||
presenceData.largeImageKey = | ||
document | ||
.querySelector<HTMLImageElement>('[alt="main product photo"]') | ||
?.getAttribute("src") ?? "logo"; | ||
presenceData.details = "Viewing product"; | ||
presenceData.state = game.textContent; | ||
} else if (document.querySelector("#product-addtocart-button")) { | ||
presenceData.largeImageKey = | ||
document | ||
.querySelector<HTMLImageElement>('[alt="main product photo"]') | ||
?.getAttribute("src") ?? "logo"; | ||
presenceData.buttons = [ | ||
{ | ||
label: "View Product", | ||
url: href, | ||
}, | ||
]; | ||
presenceData.details = "Viewing product"; | ||
presenceData.state = document.querySelector<HTMLMetaElement>( | ||
"meta[property='og:title']" | ||
).content; | ||
} else if (series) { | ||
presenceData.buttons = [ | ||
{ | ||
label: "View Product Series", | ||
url: href, | ||
}, | ||
]; | ||
presenceData.details = "Viewing product series"; | ||
presenceData.state = series.querySelector('[alt*=" "]').getAttribute("alt"); | ||
} else if (active || pathname.includes("/coming-soon")) { | ||
presenceData.buttons = [ | ||
{ | ||
label: "View Category", | ||
url: href, | ||
}, | ||
]; | ||
presenceData.details = "Viewing Category:"; | ||
presenceData.state = active?.textContent ?? "Coming soon"; | ||
} else if (pathname.includes("-sale")) { | ||
presenceData.details = | ||
document.querySelector<HTMLMetaElement>('[name="title"]').content; | ||
} else if (pathname.includes("order/history")) | ||
presenceData.details = "Order History"; | ||
else if (pathname.includes("/cart")) presenceData.details = "Cart"; | ||
else if (pathname === "/") presenceData.details = "Home page"; | ||
else if (pathname.includes("/wishlist")) presenceData.details = "Wishlist"; | ||
presence.on('UpdateData', async () => { | ||
const presenceData: PresenceData = { | ||
largeImageKey: 'https://cdn.rcd.gg/PreMiD/websites/C/CDKeys/assets/logo.png', | ||
startTimestamp: browsingTimestamp, | ||
} | ||
const { pathname, href } = document.location | ||
const [buttons, covers] = await Promise.all([ | ||
presence.getSetting<boolean>('buttons'), | ||
presence.getSetting<boolean>('cover'), | ||
]) | ||
const search = document.querySelector<HTMLInputElement>('[id="search"]') | ||
const active = document.querySelector('[class="navigation__link current"]') | ||
const series = document.querySelector( | ||
'#maincontent > div.columns > div > div.wrap.cms-content', | ||
) | ||
const game = document.querySelector( | ||
'#maincontent > div.pathname-title-wrapper > h1 > span', | ||
) | ||
if (search?.value) { | ||
presenceData.details = 'Searching for' | ||
presenceData.state = search.value | ||
presenceData.smallImageKey = Assets.Search | ||
} | ||
else if (game) { | ||
presenceData.buttons = [ | ||
{ | ||
label: 'View Game', | ||
url: href, | ||
}, | ||
] | ||
presenceData.largeImageKey = document | ||
.querySelector<HTMLImageElement>('[alt="main product photo"]') | ||
?.getAttribute('src') ?? 'logo' | ||
presenceData.details = 'Viewing product' | ||
presenceData.state = game.textContent | ||
} | ||
else if (document.querySelector('#product-addtocart-button')) { | ||
presenceData.largeImageKey = document | ||
.querySelector<HTMLImageElement>('[alt="main product photo"]') | ||
?.getAttribute('src') ?? 'logo' | ||
presenceData.buttons = [ | ||
{ | ||
label: 'View Product', | ||
url: href, | ||
}, | ||
] | ||
presenceData.details = 'Viewing product' | ||
presenceData.state = document.querySelector<HTMLMetaElement>( | ||
'meta[property=\'og:title\']', | ||
)?.content | ||
} | ||
else if (series) { | ||
presenceData.buttons = [ | ||
{ | ||
label: 'View Product Series', | ||
url: href, | ||
}, | ||
] | ||
presenceData.details = 'Viewing product series' | ||
presenceData.state = series.querySelector('[alt*=" "]')?.getAttribute('alt') | ||
} | ||
else if (active || pathname.includes('/coming-soon')) { | ||
presenceData.buttons = [ | ||
{ | ||
label: 'View Category', | ||
url: href, | ||
}, | ||
] | ||
presenceData.details = 'Viewing Category:' | ||
presenceData.state = active?.textContent ?? 'Coming soon' | ||
} | ||
else if (pathname.includes('-sale')) { | ||
presenceData.details = document.querySelector<HTMLMetaElement>('[name="title"]')?.content | ||
} | ||
else if (pathname.includes('order/history')) { | ||
presenceData.details = 'Order History' | ||
} | ||
else if (pathname.includes('/cart')) { | ||
presenceData.details = 'Cart' | ||
} | ||
else if (pathname === '/') { | ||
presenceData.details = 'Home page' | ||
} | ||
else if (pathname.includes('/wishlist')) { | ||
presenceData.details = 'Wishlist' | ||
} | ||
|
||
if (!buttons) delete presenceData.buttons; | ||
if (!covers) { | ||
presenceData.largeImageKey = | ||
"https://cdn.rcd.gg/PreMiD/websites/C/CDKeys/assets/logo.png"; | ||
} | ||
if (presenceData.details) presence.setActivity(presenceData); | ||
else presence.setActivity(); | ||
}); | ||
if (!buttons) | ||
delete presenceData.buttons | ||
if (!covers) { | ||
presenceData.largeImageKey = 'https://cdn.rcd.gg/PreMiD/websites/C/CDKeys/assets/logo.png' | ||
} | ||
if (presenceData.details) | ||
presence.setActivity(presenceData) | ||
else presence.setActivity() | ||
}) |
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
{ | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"name": "Eren", | ||
"id": "478937019758673931" | ||
}, | ||
"service": "CHIP Online", | ||
"description": { | ||
"tr": "Teknoloji/spor/gündem ve insanların blog oluşturduğu, Türkiye'de popüler bir site.", | ||
"en": "CHIP Online is the independent web portal of the CHIP brand.", | ||
"nl": "CHIP Online is het onafhankelijke webportaal van het merk CHIP.", | ||
"vi_VN": "CHIP Online là cổng trang web độc lập của thương hiệu CHIP." | ||
}, | ||
"url": "www.chip.com.tr", | ||
"version": "1.4.23", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/C/CHIP%20Online/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/C/CHIP%20Online/assets/thumbnail.png", | ||
"color": "#F10C0C", | ||
"category": "other", | ||
"tags": [ | ||
"news", | ||
"turkish" | ||
] | ||
} | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"name": "Eren", | ||
"id": "478937019758673931" | ||
}, | ||
"service": "CHIP Online", | ||
"description": { | ||
"tr": "Teknoloji/spor/gündem ve insanların blog oluşturduğu, Türkiye'de popüler bir site.", | ||
"en": "CHIP Online is the independent web portal of the CHIP brand.", | ||
"nl": "CHIP Online is het onafhankelijke webportaal van het merk CHIP.", | ||
"vi_VN": "CHIP Online là cổng trang web độc lập của thương hiệu CHIP." | ||
}, | ||
"url": "www.chip.com.tr", | ||
"version": "1.4.23", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/C/CHIP%20Online/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/C/CHIP%20Online/assets/thumbnail.png", | ||
"color": "#F10C0C", | ||
"category": "other", | ||
"tags": [ | ||
"news", | ||
"turkish" | ||
] | ||
} |
Oops, something went wrong.