-
-
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
100 changed files
with
6,439 additions
and
6,229 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,34 +1,34 @@ | ||
{ | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"name": "QkeleQ10", | ||
"id": "807917674477649943" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "STEPHAN", | ||
"id": "183233556150091776" | ||
} | ||
], | ||
"service": "JUKE", | ||
"description": { | ||
"en": "JUKE is a Dutch radio channel collection site. JUKE is a Talpa Network company.", | ||
"nl": "JUKE is een verzamelingssite voor radiostations. JUKE is een merk van Talpa Network." | ||
}, | ||
"url": "juke.nl", | ||
"version": "2.0.18", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/J/JUKE/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/J/JUKE/assets/thumbnail.png", | ||
"color": "#38af85", | ||
"category": "music", | ||
"tags": [ | ||
"juke", | ||
"talpa", | ||
"radio", | ||
"music", | ||
"muziek", | ||
"free", | ||
"gratis" | ||
] | ||
} | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"name": "QkeleQ10", | ||
"id": "807917674477649943" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "STEPHAN", | ||
"id": "183233556150091776" | ||
} | ||
], | ||
"service": "JUKE", | ||
"description": { | ||
"en": "JUKE is a Dutch radio channel collection site. JUKE is a Talpa Network company.", | ||
"nl": "JUKE is een verzamelingssite voor radiostations. JUKE is een merk van Talpa Network." | ||
}, | ||
"url": "juke.nl", | ||
"version": "2.0.18", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/J/JUKE/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/J/JUKE/assets/thumbnail.png", | ||
"color": "#38af85", | ||
"category": "music", | ||
"tags": [ | ||
"juke", | ||
"talpa", | ||
"radio", | ||
"music", | ||
"muziek", | ||
"free", | ||
"gratis" | ||
] | ||
} |
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,53 +1,58 @@ | ||
const presence = new Presence({ | ||
clientId: "811305223783448627", | ||
}); | ||
clientId: '811305223783448627', | ||
}) | ||
|
||
presence.on("UpdateData", async () => { | ||
const presenceData: PresenceData = { | ||
largeImageKey: "https://cdn.rcd.gg/PreMiD/websites/J/JUKE/assets/logo.png", | ||
buttons: [{ label: "Radio luisteren", url: document.location.href }], | ||
}; | ||
presence.on('UpdateData', async () => { | ||
const presenceData: PresenceData = { | ||
largeImageKey: 'https://cdn.rcd.gg/PreMiD/websites/J/JUKE/assets/logo.png', | ||
buttons: [{ label: 'Radio luisteren', url: document.location.href }], | ||
} | ||
|
||
if (document.querySelector("span[class*=eC-title]")) { | ||
presenceData.details = document | ||
.querySelector("span[class*=eC-title]") | ||
.textContent.replace("De ", "de ") | ||
.replace("Het ", "het ") | ||
.replace("&", "&"); | ||
if (document.querySelector("span[class*=eC-subtitle]")) { | ||
presenceData.state = document | ||
.querySelector("span[class*=eC-subtitle]") | ||
.textContent.replace("De ", "de ") | ||
.replace("Het ", "het ") | ||
.replace("&", "&"); | ||
} | ||
} | ||
if (document.querySelector('span[class*=eC-title]')) { | ||
presenceData.details = document | ||
.querySelector('span[class*=eC-title]') | ||
?.textContent | ||
?.replace('De ', 'de ') | ||
.replace('Het ', 'het ') | ||
.replace('&', '&') | ||
if (document.querySelector('span[class*=eC-subtitle]')) { | ||
presenceData.state = document | ||
.querySelector('span[class*=eC-subtitle]') | ||
?.textContent | ||
?.replace('De ', 'de ') | ||
.replace('Het ', 'het ') | ||
.replace('&', '&') | ||
} | ||
} | ||
|
||
if (!presenceData.details) { | ||
presenceData.details = "Bladert op JUKE.nl"; | ||
presenceData.state = `Pagina '${document.title | ||
.replace(" |", "|") | ||
.split("|")[0] | ||
.replace( | ||
"JUKE - Luister nu jouw favoriete radiozenders, non-stop muziek en podcasts!", | ||
"Home" | ||
)}'`; | ||
} | ||
if (!presenceData.details) { | ||
presenceData.details = 'Bladert op JUKE.nl' | ||
presenceData.state = `Pagina '${document.title | ||
.replace(' |', '|') | ||
.split('|')[0] | ||
.replace( | ||
'JUKE - Luister nu jouw favoriete radiozenders, non-stop muziek en podcasts!', | ||
'Home', | ||
)}'` | ||
} | ||
|
||
if (document.querySelector("rect")) { | ||
presenceData.smallImageKey = Assets.Play; | ||
presenceData.smallImageText = "Wordt afgespeeld"; | ||
presenceData.buttons = [ | ||
{ label: "Ook radio luisteren", url: document.location.href }, | ||
]; | ||
} else if (document.querySelector("[class*=spinner]")) { | ||
presenceData.smallImageKey = Assets.Pause; | ||
presenceData.smallImageText = "Wordt geladen"; | ||
} else if (document.querySelector("polygon")) { | ||
presenceData.smallImageKey = Assets.Pause; | ||
presenceData.smallImageText = "Gepauzeerd"; | ||
} | ||
if (document.querySelector('rect')) { | ||
presenceData.smallImageKey = Assets.Play | ||
presenceData.smallImageText = 'Wordt afgespeeld' | ||
presenceData.buttons = [ | ||
{ label: 'Ook radio luisteren', url: document.location.href }, | ||
] | ||
} | ||
else if (document.querySelector('[class*=spinner]')) { | ||
presenceData.smallImageKey = Assets.Pause | ||
presenceData.smallImageText = 'Wordt geladen' | ||
} | ||
else if (document.querySelector('polygon')) { | ||
presenceData.smallImageKey = Assets.Pause | ||
presenceData.smallImageText = 'Gepauzeerd' | ||
} | ||
|
||
if (presenceData.details) presence.setActivity(presenceData); | ||
else presence.setActivity(); | ||
}); | ||
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,41 +1,41 @@ | ||
interface Game { | ||
name: string; | ||
logo: string; | ||
getPresenceData: ( | ||
params: GameCallbackParams | ||
) => Promise<PresenceData> | PresenceData; | ||
name: string | ||
logo: string | ||
getPresenceData: ( | ||
params: GameCallbackParams | ||
) => Promise<PresenceData> | PresenceData | ||
} | ||
|
||
interface GamePlayerState { | ||
playerName?: string; | ||
username?: string; | ||
playerInfo?: { | ||
username?: string; | ||
}; | ||
state?: string; | ||
status?: string; | ||
kind?: string; | ||
category?: string; | ||
prompt?: { | ||
text?: string; | ||
html?: string; | ||
}; | ||
entryId?: string; | ||
choiceId?: string; | ||
responseKey?: string; | ||
placeholder?: string; | ||
choiceType?: string; | ||
classes?: string[]; | ||
[x: string]: unknown; | ||
playerName?: string | ||
username?: string | ||
playerInfo?: { | ||
username?: string | ||
} | ||
state?: string | ||
status?: string | ||
kind?: string | ||
category?: string | ||
prompt?: { | ||
text?: string | ||
html?: string | ||
} | ||
entryId?: string | ||
choiceId?: string | ||
responseKey?: string | ||
placeholder?: string | ||
choiceType?: string | ||
classes?: string[] | ||
[x: string]: unknown | ||
} | ||
|
||
interface GameInfoState { | ||
name?: string; | ||
name?: string | ||
} | ||
|
||
interface GameCallbackParams { | ||
playerState: GamePlayerState; | ||
infoState: GameInfoState; | ||
tag: string; | ||
presence: Presence; | ||
playerState: GamePlayerState | ||
infoState: GameInfoState | ||
tag: string | ||
presence: Presence | ||
} |
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,55 +1,55 @@ | ||
export const name = "Drawful"; | ||
export const logo = "https://cdn.rcd.gg/PreMiD/websites/J/Jackbox/assets/0.png"; | ||
export const name = 'Drawful' | ||
export const logo = 'https://cdn.rcd.gg/PreMiD/websites/J/Jackbox/assets/0.png' | ||
|
||
export function getPresenceData(): PresenceData { | ||
const currentGamePage = document.querySelector<HTMLDivElement>( | ||
".drawful-page:not(.pt-page-off)" | ||
), | ||
{ classList, id } = currentGamePage; | ||
switch (true) { | ||
case classList.contains("state-lobby"): { | ||
return { state: "Waiting in lobby" }; | ||
} | ||
case classList.contains("state-lyingdone"): | ||
case classList.contains("state-nothing"): | ||
case classList.contains("state-drawing-done"): { | ||
return { state: "Waiting" }; | ||
} | ||
case classList.contains("state-round"): { | ||
return { state: currentGamePage.querySelector("span").textContent }; | ||
} | ||
case classList.contains("state-drawing-sent"): { | ||
return { state: "Waiting for other players to finish drawing" }; | ||
} | ||
case classList.contains("state-enterlie"): { | ||
return { state: "Entering a lie" }; | ||
} | ||
case classList.contains("state-chooselie"): { | ||
return { state: "Looking for the truth" }; | ||
} | ||
case classList.contains("state-chooselikes"): { | ||
return { state: "Liking lies" }; | ||
} | ||
case classList.contains("state-liereceived"): { | ||
return { state: "Waiting for other players to enter lies" }; | ||
} | ||
case classList.contains("state-notchoosing"): { | ||
return { state: "Waiting for other players to discover the truth" }; | ||
} | ||
case classList.contains("state-draw"): { | ||
return { state: "Drawing something" }; | ||
} | ||
case classList.contains("state-audience-choose"): { | ||
return { state: "Choosing a lie" }; | ||
} | ||
case id === "state-ugc": { | ||
return { state: "Creating a custom game" }; | ||
} | ||
case classList.contains("state-audience"): { | ||
return { state: "In the audience" }; | ||
} | ||
default: { | ||
return {}; | ||
} | ||
} | ||
const currentGamePage = document.querySelector<HTMLDivElement>( | ||
'.drawful-page:not(.pt-page-off)', | ||
)! | ||
const { classList, id } = currentGamePage | ||
switch (true) { | ||
case classList.contains('state-lobby'): { | ||
return { state: 'Waiting in lobby' } | ||
} | ||
case classList.contains('state-lyingdone'): | ||
case classList.contains('state-nothing'): | ||
case classList.contains('state-drawing-done'): { | ||
return { state: 'Waiting' } | ||
} | ||
case classList.contains('state-round'): { | ||
return { state: currentGamePage.querySelector('span')?.textContent } | ||
} | ||
case classList.contains('state-drawing-sent'): { | ||
return { state: 'Waiting for other players to finish drawing' } | ||
} | ||
case classList.contains('state-enterlie'): { | ||
return { state: 'Entering a lie' } | ||
} | ||
case classList.contains('state-chooselie'): { | ||
return { state: 'Looking for the truth' } | ||
} | ||
case classList.contains('state-chooselikes'): { | ||
return { state: 'Liking lies' } | ||
} | ||
case classList.contains('state-liereceived'): { | ||
return { state: 'Waiting for other players to enter lies' } | ||
} | ||
case classList.contains('state-notchoosing'): { | ||
return { state: 'Waiting for other players to discover the truth' } | ||
} | ||
case classList.contains('state-draw'): { | ||
return { state: 'Drawing something' } | ||
} | ||
case classList.contains('state-audience-choose'): { | ||
return { state: 'Choosing a lie' } | ||
} | ||
case id === 'state-ugc': { | ||
return { state: 'Creating a custom game' } | ||
} | ||
case classList.contains('state-audience'): { | ||
return { state: 'In the audience' } | ||
} | ||
default: { | ||
return {} | ||
} | ||
} | ||
} |
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,9 +1,9 @@ | ||
import { | ||
logo as drawfulLogo, | ||
getPresenceData as drawfulUpdateData, | ||
} from "./drawful"; | ||
logo as drawfulLogo, | ||
getPresenceData as drawfulUpdateData, | ||
} from './drawful' | ||
|
||
export const name = "Drawful 2"; | ||
export const logo = drawfulLogo; | ||
export const name = 'Drawful 2' | ||
export const logo = drawfulLogo | ||
|
||
export const getPresenceData = drawfulUpdateData; | ||
export const getPresenceData = drawfulUpdateData |
12 changes: 6 additions & 6 deletions
12
websites/J/Jackbox/games/Party Pack 1/drawful2international.ts
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,9 +1,9 @@ | ||
import { | ||
logo as drawfulLogo, | ||
getPresenceData as drawfulUpdateData, | ||
} from "./drawful"; | ||
logo as drawfulLogo, | ||
getPresenceData as drawfulUpdateData, | ||
} from './drawful' | ||
|
||
export const name = "Drawful 2 International"; | ||
export const logo = drawfulLogo; | ||
export const name = 'Drawful 2 International' | ||
export const logo = drawfulLogo | ||
|
||
export const getPresenceData = drawfulUpdateData; | ||
export const getPresenceData = drawfulUpdateData |
Oops, something went wrong.