-
-
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
220 changed files
with
20,682 additions
and
19,644 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,50 +1,50 @@ | ||
{ | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"name": "ry", | ||
"id": "421371986824921109" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "MrBartusek", | ||
"id": "212988300137463809" | ||
} | ||
], | ||
"service": "SCP Wiki", | ||
"description": { | ||
"en": "Operating clandestine and worldwide, the Foundation operates beyond jurisdiction, empowered and entrusted by every major national government with the task of containing anomalous objects, entities, and phenomena.", | ||
"nl": "De Stichting opereert clandestien en wereldwijd, buiten jurisdictie, gemachtigd en toevertrouwd door elke grote nationale regering met de taak om afwijkende objecten, entiteiten en fenomenen in toom te houden." | ||
}, | ||
"url": [ | ||
"scp-wiki.wikidot.com", | ||
"scp-wiki-cn.wikidot.com", | ||
"scp-cs.wikidot.com", | ||
"fondationscp.wikidot.com", | ||
"scp-wiki-de.wikidot.com", | ||
"scp-int.wikidot.com", | ||
"fondazionescp.wikidot.com", | ||
"ja.scp-wiki.net", | ||
"ko.scp-wiki.net", | ||
"scp-wiki.net.pl", | ||
"scp-pt-br.wikidot.com", | ||
"scpfoundation.net", | ||
"scp-es.com", | ||
"scp-th.wikidot.com", | ||
"scpclassic.wikidot.com", | ||
"scpexplained.wikidot.com", | ||
"scp-sandbox-3.wikidot.com", | ||
"www.scpwiki.com" | ||
], | ||
"version": "1.2.26", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/thumbnail.png", | ||
"color": "#BB0011", | ||
"category": "other", | ||
"tags": [ | ||
"fiction", | ||
"horror", | ||
"reading", | ||
"wiki" | ||
] | ||
} | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"name": "ry", | ||
"id": "421371986824921109" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "MrBartusek", | ||
"id": "212988300137463809" | ||
} | ||
], | ||
"service": "SCP Wiki", | ||
"description": { | ||
"en": "Operating clandestine and worldwide, the Foundation operates beyond jurisdiction, empowered and entrusted by every major national government with the task of containing anomalous objects, entities, and phenomena.", | ||
"nl": "De Stichting opereert clandestien en wereldwijd, buiten jurisdictie, gemachtigd en toevertrouwd door elke grote nationale regering met de taak om afwijkende objecten, entiteiten en fenomenen in toom te houden." | ||
}, | ||
"url": [ | ||
"scp-wiki.wikidot.com", | ||
"scp-wiki-cn.wikidot.com", | ||
"scp-cs.wikidot.com", | ||
"fondationscp.wikidot.com", | ||
"scp-wiki-de.wikidot.com", | ||
"scp-int.wikidot.com", | ||
"fondazionescp.wikidot.com", | ||
"ja.scp-wiki.net", | ||
"ko.scp-wiki.net", | ||
"scp-wiki.net.pl", | ||
"scp-pt-br.wikidot.com", | ||
"scpfoundation.net", | ||
"scp-es.com", | ||
"scp-th.wikidot.com", | ||
"scpclassic.wikidot.com", | ||
"scpexplained.wikidot.com", | ||
"scp-sandbox-3.wikidot.com", | ||
"www.scpwiki.com" | ||
], | ||
"version": "1.2.26", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/thumbnail.png", | ||
"color": "#BB0011", | ||
"category": "other", | ||
"tags": [ | ||
"fiction", | ||
"horror", | ||
"reading", | ||
"wiki" | ||
] | ||
} |
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,33 +1,34 @@ | ||
const presence = new Presence({ | ||
clientId: "639208971806310441", | ||
}), | ||
browsingTimestamp = Math.floor(Date.now() / 1000); | ||
clientId: '639208971806310441', | ||
}) | ||
const browsingTimestamp = Math.floor(Date.now() / 1000) | ||
|
||
const enum Assets { | ||
Logo = "https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/logo.png", | ||
LogoInt = "https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/0.png", | ||
LogoSandbox = "https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/1.png", | ||
Logo = 'https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/logo.png', | ||
LogoInt = 'https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/0.png', | ||
LogoSandbox = 'https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/1.png', | ||
} | ||
|
||
presence.on("UpdateData", async () => { | ||
const presenceData: PresenceData = { | ||
largeImageKey: | ||
"https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/logo.png", | ||
startTimestamp: browsingTimestamp, | ||
}; | ||
presence.on('UpdateData', async () => { | ||
const presenceData: PresenceData = { | ||
largeImageKey: 'https://cdn.rcd.gg/PreMiD/websites/S/SCP%20Wiki/assets/logo.png', | ||
startTimestamp: browsingTimestamp, | ||
} | ||
|
||
if (document.location.hostname === "scp-int.wikidot.com") | ||
presenceData.largeImageKey = Assets.LogoInt; | ||
if (document.location.hostname === "scp-sandbox-3.wikidot.com") | ||
presenceData.largeImageKey = Assets.LogoSandbox; | ||
if (document.location.hostname === 'scp-int.wikidot.com') | ||
presenceData.largeImageKey = Assets.LogoInt | ||
if (document.location.hostname === 'scp-sandbox-3.wikidot.com') | ||
presenceData.largeImageKey = Assets.LogoSandbox | ||
|
||
if (document.location.pathname === "/" || !document.location.pathname) | ||
presenceData.state = "Front Page"; | ||
else { | ||
presenceData.state = document | ||
.querySelector("#page-title") | ||
.textContent.trim(); | ||
} | ||
if (document.location.pathname === '/' || !document.location.pathname) { | ||
presenceData.state = 'Front Page' | ||
} | ||
else { | ||
presenceData.state = document | ||
.querySelector('#page-title') | ||
?.textContent | ||
?.trim() | ||
} | ||
|
||
presence.setActivity(presenceData); | ||
}); | ||
presence.setActivity(presenceData) | ||
}) |
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,31 +1,31 @@ | ||
{ | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"id": "189690228292845568", | ||
"name": "angelolz" | ||
}, | ||
"service": "SDVX Index", | ||
"description": { | ||
"en": "A chart viewer for Sound Voltex, providing top-down overviews of charts for players to study and practice." | ||
}, | ||
"url": "sdvxindex.com", | ||
"version": "1.0.7", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/S/SDVX%20Index/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/S/SDVX%20Index/assets/thumbnail.png", | ||
"color": "#365191", | ||
"category": "games", | ||
"tags": [ | ||
"sdvx", | ||
"games", | ||
"arcade" | ||
], | ||
"settings": [ | ||
{ | ||
"id": "buttons", | ||
"title": "Show Buttons", | ||
"icon": "fa-regular fa-rectangle-list", | ||
"value": true | ||
} | ||
] | ||
} | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"id": "189690228292845568", | ||
"name": "angelolz" | ||
}, | ||
"service": "SDVX Index", | ||
"description": { | ||
"en": "A chart viewer for Sound Voltex, providing top-down overviews of charts for players to study and practice." | ||
}, | ||
"url": "sdvxindex.com", | ||
"version": "1.0.7", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/S/SDVX%20Index/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/S/SDVX%20Index/assets/thumbnail.png", | ||
"color": "#365191", | ||
"category": "games", | ||
"tags": [ | ||
"sdvx", | ||
"games", | ||
"arcade" | ||
], | ||
"settings": [ | ||
{ | ||
"id": "buttons", | ||
"title": "Show Buttons", | ||
"icon": "fa-regular fa-rectangle-list", | ||
"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,81 +1,91 @@ | ||
let browsingTimestamp = Math.floor(Date.now() / 1000), | ||
lastPage = document.location.href; | ||
let browsingTimestamp = Math.floor(Date.now() / 1000) | ||
let lastPage = document.location.href | ||
|
||
const presence = new Presence({ | ||
clientId: "1214435082408820776", | ||
}); | ||
clientId: '1214435082408820776', | ||
}) | ||
|
||
const enum Assets { | ||
Logo = "https://cdn.rcd.gg/PreMiD/websites/S/SDVX%20Index/assets/logo.png", | ||
Logo = 'https://cdn.rcd.gg/PreMiD/websites/S/SDVX%20Index/assets/logo.png', | ||
} | ||
|
||
presence.on("UpdateData", async () => { | ||
const presenceData: PresenceData = { | ||
largeImageKey: Assets.Logo, | ||
startTimestamp: browsingTimestamp, | ||
}, | ||
{ pathname, href } = document.location, | ||
showButtons = await presence.getSetting<boolean>("buttons"), | ||
path = pathname.split("/"); | ||
presence.on('UpdateData', async () => { | ||
const presenceData: PresenceData = { | ||
largeImageKey: Assets.Logo, | ||
startTimestamp: browsingTimestamp, | ||
} | ||
const { pathname, href } = document.location | ||
const showButtons = await presence.getSetting<boolean>('buttons') | ||
const path = pathname.split('/') | ||
|
||
path.shift(); | ||
if (pathname.endsWith("/")) path.pop(); | ||
path.shift() | ||
if (pathname.endsWith('/')) | ||
path.pop() | ||
|
||
if (lastPage !== href) { | ||
lastPage = href; | ||
browsingTimestamp = Math.floor(Date.now() / 1000); | ||
} | ||
if (lastPage !== href) { | ||
lastPage = href | ||
browsingTimestamp = Math.floor(Date.now() / 1000) | ||
} | ||
|
||
if (path[0] === "song.php") getSongDetails(presenceData, href, showButtons); | ||
else { | ||
presenceData.details = "Looking for a chart"; | ||
if (path[0].startsWith("level_sort")) | ||
presenceData.state = "Sorting by level"; | ||
else if (path[0].startsWith("date_sort")) | ||
presenceData.state = "Sorting by game version"; | ||
else if (path[0].startsWith("diff_sort")) | ||
presenceData.state = "Sorting by difficulty"; | ||
else if (path[0].startsWith("title_sort")) | ||
presenceData.state = "Sorting by title"; | ||
else if (path[0].startsWith("genre_sort")) | ||
presenceData.state = "Sorting by genre"; | ||
else if (path[0].startsWith("radar_sort")) | ||
presenceData.state = "Sorting by radar category"; | ||
else if (path[0].startsWith("search_song")) { | ||
presenceData.state = "Searching..."; | ||
presenceData.smallImageKey = Assets.Search; | ||
} | ||
} | ||
presence.setActivity(presenceData); | ||
}); | ||
if (path[0] === 'song.php') { | ||
getSongDetails(presenceData, href, showButtons) | ||
} | ||
else { | ||
presenceData.details = 'Looking for a chart' | ||
if (path[0].startsWith('level_sort')) { | ||
presenceData.state = 'Sorting by level' | ||
} | ||
else if (path[0].startsWith('date_sort')) { | ||
presenceData.state = 'Sorting by game version' | ||
} | ||
else if (path[0].startsWith('diff_sort')) { | ||
presenceData.state = 'Sorting by difficulty' | ||
} | ||
else if (path[0].startsWith('title_sort')) { | ||
presenceData.state = 'Sorting by title' | ||
} | ||
else if (path[0].startsWith('genre_sort')) { | ||
presenceData.state = 'Sorting by genre' | ||
} | ||
else if (path[0].startsWith('radar_sort')) { | ||
presenceData.state = 'Sorting by radar category' | ||
} | ||
else if (path[0].startsWith('search_song')) { | ||
presenceData.state = 'Searching...' | ||
presenceData.smallImageKey = Assets.Search | ||
} | ||
} | ||
presence.setActivity(presenceData) | ||
}) | ||
|
||
function getSongDetails( | ||
presenceData: PresenceData, | ||
href: string, | ||
showButtons: boolean | ||
presenceData: PresenceData, | ||
href: string, | ||
showButtons: boolean, | ||
): void { | ||
presenceData.details = `${ | ||
document.querySelector("#songTitle").textContent | ||
} / ${document.querySelector("#artistName").textContent}`; | ||
presenceData.state = `${ | ||
document.querySelector(".currentDiff .difficulty-abbreviation1").textContent | ||
}${ | ||
document.querySelector(".currentDiff .difficulty-level1").textContent | ||
} | BPM: ${document.querySelector("#bpmInfo").textContent} | Max EX: ${ | ||
document.querySelector("#exInfo").textContent | ||
}`; | ||
presenceData.largeImageKey = document | ||
.querySelector("#jacketArt") | ||
.getAttribute("src"); | ||
presenceData.smallImageKey = Assets.Viewing; | ||
presenceData.smallImageText = "Viewing a chart"; | ||
presenceData.details = `${ | ||
document.querySelector('#songTitle')?.textContent | ||
} / ${document.querySelector('#artistName')?.textContent}` | ||
presenceData.state = `${ | ||
document.querySelector('.currentDiff .difficulty-abbreviation1') | ||
?.textContent | ||
}${ | ||
document.querySelector('.currentDiff .difficulty-level1')?.textContent | ||
} | BPM: ${document.querySelector('#bpmInfo')?.textContent} | Max EX: ${ | ||
document.querySelector('#exInfo')?.textContent | ||
}` | ||
presenceData.largeImageKey = document | ||
.querySelector('#jacketArt') | ||
?.getAttribute('src') | ||
presenceData.smallImageKey = Assets.Viewing | ||
presenceData.smallImageText = 'Viewing a chart' | ||
|
||
if (showButtons) { | ||
presenceData.buttons = [ | ||
{ | ||
label: "View Chart", | ||
url: href, | ||
}, | ||
]; | ||
} | ||
if (showButtons) { | ||
presenceData.buttons = [ | ||
{ | ||
label: 'View Chart', | ||
url: href, | ||
}, | ||
] | ||
} | ||
} |
Oops, something went wrong.