-
-
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
136 changed files
with
11,739 additions
and
11,083 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,28 +1,28 @@ | ||
{ | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"id": "354233941550694400", | ||
"name": "kuriel." | ||
}, | ||
"service": "PCGamingWiki", | ||
"description": { | ||
"en": "PCGamingWiki aims to list fixes and workarounds for every single PC game. " | ||
}, | ||
"url": [ | ||
"www.pcgamingwiki.com", | ||
"pcgamingwiki.com", | ||
"community.pcgamingwiki.com" | ||
], | ||
"version": "1.0.1", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/P/PCGamingWiki/assets/logo.jpeg", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/P/PCGamingWiki/assets/thumbnail.png", | ||
"color": "#556db3", | ||
"category": "other", | ||
"tags": [ | ||
"wiki", | ||
"information", | ||
"pc", | ||
"gaming" | ||
] | ||
} | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"id": "354233941550694400", | ||
"name": "kuriel." | ||
}, | ||
"service": "PCGamingWiki", | ||
"description": { | ||
"en": "PCGamingWiki aims to list fixes and workarounds for every single PC game. " | ||
}, | ||
"url": [ | ||
"www.pcgamingwiki.com", | ||
"pcgamingwiki.com", | ||
"community.pcgamingwiki.com" | ||
], | ||
"version": "1.0.1", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/P/PCGamingWiki/assets/logo.jpeg", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/P/PCGamingWiki/assets/thumbnail.png", | ||
"color": "#556db3", | ||
"category": "other", | ||
"tags": [ | ||
"wiki", | ||
"information", | ||
"pc", | ||
"gaming" | ||
] | ||
} |
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,143 +1,153 @@ | ||
const presence = new Presence({ | ||
clientId: "1325499066565656647", | ||
}), | ||
browsingTimestamp = Math.floor(Date.now() / 1000); | ||
clientId: '1325499066565656647', | ||
}) | ||
const browsingTimestamp = Math.floor(Date.now() / 1000) | ||
|
||
const enum Assets { | ||
Logo = "https://cdn.rcd.gg/PreMiD/websites/P/PCGamingWiki/assets/0.png", | ||
Logo = 'https://cdn.rcd.gg/PreMiD/websites/P/PCGamingWiki/assets/0.png', | ||
} | ||
|
||
presence.on("UpdateData", async () => { | ||
const { pathname, search, href, hostname } = document.location, | ||
presenceData: PresenceData = { | ||
largeImageKey: Assets.Logo, | ||
startTimestamp: browsingTimestamp, | ||
details: "Viewing Page:", | ||
}; | ||
presence.on('UpdateData', async () => { | ||
const { pathname, search, href, hostname } = document.location | ||
const presenceData: PresenceData = { | ||
largeImageKey: Assets.Logo, | ||
startTimestamp: browsingTimestamp, | ||
details: 'Viewing Page:', | ||
} | ||
|
||
switch (hostname) { | ||
case "community.pcgamingwiki.com": { | ||
switch (pathname.split("/")[1]) { | ||
case "topic": { | ||
presenceData.details = "On Topic:"; | ||
presenceData.state = document.querySelector( | ||
"span.ipsType_break > span:nth-child(1)" | ||
); | ||
presenceData.buttons = [{ label: "View Topic", url: href }]; | ||
break; | ||
} | ||
case "forum": { | ||
presenceData.details = "On Forum:"; | ||
presenceData.state = document.querySelector(".ipsType_pageTitle"); | ||
presenceData.buttons = [{ label: "View Forum", url: href }]; | ||
break; | ||
} | ||
case "profile": { | ||
presenceData.details = "Viewing Profile:"; | ||
presenceData.state = document.querySelector("h1.ipsType_reset"); | ||
break; | ||
} | ||
case "staff": { | ||
presenceData.details = "On Staff page"; | ||
break; | ||
} | ||
case "leaderboard": | ||
case "pastleaders": | ||
case "topmembers": { | ||
presenceData.details = "On Leaderboard page"; | ||
break; | ||
} | ||
case "gallery": { | ||
if (pathname.split("/")[2] === "image") { | ||
presenceData.details = "Viewing Image:"; | ||
presenceData.state = document.querySelector("span.ipsContained"); | ||
presenceData.buttons = [{ label: "View Image", url: href }]; | ||
} else presenceData.details = "On Gallery page"; | ||
break; | ||
} | ||
case "online": { | ||
presenceData.details = "Viewing Online Users"; | ||
break; | ||
} | ||
case "files": { | ||
if (pathname.split("/")[2] === "file") { | ||
presenceData.details = "Viewing File:"; | ||
presenceData.state = document.querySelector( | ||
"h1.ipsType_pageTitle > span:nth-child(1)" | ||
); | ||
presenceData.buttons = [{ label: "View File", url: href }]; | ||
} else presenceData.details = "Viewing Files page"; | ||
break; | ||
} | ||
case "tags": { | ||
presenceData.details = "Searching for tag:"; | ||
presenceData.state = decodeURIComponent(pathname.split("/")[2]); | ||
break; | ||
} | ||
case "search": { | ||
presenceData.details = "On Search Page"; | ||
if (search.split("=")[1]) { | ||
presenceData.details = "Searching the Community for:"; | ||
presenceData.state = decodeURIComponent( | ||
search.split("=")[1] | ||
).replace("&search_and_or", ""); | ||
} | ||
break; | ||
} | ||
case "discover": { | ||
presenceData.details = "Viewing All Activity"; | ||
break; | ||
} | ||
default: { | ||
presenceData.details = "Exploring Community"; | ||
break; | ||
} | ||
} | ||
break; | ||
} | ||
default: { | ||
switch (pathname.split("/")[2]) { | ||
case "Home": { | ||
presenceData.details = "In Home"; | ||
break; | ||
} | ||
case "PCGamingWiki:About": { | ||
presenceData.state = "About Us"; | ||
break; | ||
} | ||
case "index.php": { | ||
if (decodeURIComponent(search.split("=")[2]) === "edit") { | ||
presenceData.details = "Viewing Source of:"; | ||
presenceData.state = document | ||
.querySelector(".article-title") | ||
?.textContent?.trim() | ||
.replace("View source for ", ""); | ||
} | ||
if (decodeURIComponent(search.split("=")[2]) === "history") { | ||
presenceData.details = "Viewing revision history of:"; | ||
presenceData.state = document | ||
.querySelector(".article-title") | ||
?.textContent?.trim() | ||
.replace("Revision history of ", "") | ||
.slice(1, -1); | ||
} else { | ||
presenceData.details = "Searching for:"; | ||
presenceData.state = decodeURIComponent( | ||
search.split("=")[1] | ||
).replace("&title", ""); | ||
} | ||
break; | ||
} | ||
default: { | ||
presenceData.state = document | ||
.querySelector(".article-title") | ||
?.textContent?.trim(); | ||
break; | ||
} | ||
} | ||
break; | ||
} | ||
} | ||
switch (hostname) { | ||
case 'community.pcgamingwiki.com': { | ||
switch (pathname.split('/')[1]) { | ||
case 'topic': { | ||
presenceData.details = 'On Topic:' | ||
presenceData.state = document.querySelector( | ||
'span.ipsType_break > span:nth-child(1)', | ||
) | ||
presenceData.buttons = [{ label: 'View Topic', url: href }] | ||
break | ||
} | ||
case 'forum': { | ||
presenceData.details = 'On Forum:' | ||
presenceData.state = document.querySelector('.ipsType_pageTitle') | ||
presenceData.buttons = [{ label: 'View Forum', url: href }] | ||
break | ||
} | ||
case 'profile': { | ||
presenceData.details = 'Viewing Profile:' | ||
presenceData.state = document.querySelector('h1.ipsType_reset') | ||
break | ||
} | ||
case 'staff': { | ||
presenceData.details = 'On Staff page' | ||
break | ||
} | ||
case 'leaderboard': | ||
case 'pastleaders': | ||
case 'topmembers': { | ||
presenceData.details = 'On Leaderboard page' | ||
break | ||
} | ||
case 'gallery': { | ||
if (pathname.split('/')[2] === 'image') { | ||
presenceData.details = 'Viewing Image:' | ||
presenceData.state = document.querySelector('span.ipsContained') | ||
presenceData.buttons = [{ label: 'View Image', url: href }] | ||
} | ||
else { | ||
presenceData.details = 'On Gallery page' | ||
} | ||
break | ||
} | ||
case 'online': { | ||
presenceData.details = 'Viewing Online Users' | ||
break | ||
} | ||
case 'files': { | ||
if (pathname.split('/')[2] === 'file') { | ||
presenceData.details = 'Viewing File:' | ||
presenceData.state = document.querySelector( | ||
'h1.ipsType_pageTitle > span:nth-child(1)', | ||
) | ||
presenceData.buttons = [{ label: 'View File', url: href }] | ||
} | ||
else { | ||
presenceData.details = 'Viewing Files page' | ||
} | ||
break | ||
} | ||
case 'tags': { | ||
presenceData.details = 'Searching for tag:' | ||
presenceData.state = decodeURIComponent(pathname.split('/')[2]) | ||
break | ||
} | ||
case 'search': { | ||
presenceData.details = 'On Search Page' | ||
if (search.split('=')[1]) { | ||
presenceData.details = 'Searching the Community for:' | ||
presenceData.state = decodeURIComponent( | ||
search.split('=')[1], | ||
).replace('&search_and_or', '') | ||
} | ||
break | ||
} | ||
case 'discover': { | ||
presenceData.details = 'Viewing All Activity' | ||
break | ||
} | ||
default: { | ||
presenceData.details = 'Exploring Community' | ||
break | ||
} | ||
} | ||
break | ||
} | ||
default: { | ||
switch (pathname.split('/')[2]) { | ||
case 'Home': { | ||
presenceData.details = 'In Home' | ||
break | ||
} | ||
case 'PCGamingWiki:About': { | ||
presenceData.state = 'About Us' | ||
break | ||
} | ||
case 'index.php': { | ||
if (decodeURIComponent(search.split('=')[2]) === 'edit') { | ||
presenceData.details = 'Viewing Source of:' | ||
presenceData.state = document | ||
.querySelector('.article-title') | ||
?.textContent | ||
?.trim() | ||
.replace('View source for ', '') | ||
} | ||
if (decodeURIComponent(search.split('=')[2]) === 'history') { | ||
presenceData.details = 'Viewing revision history of:' | ||
presenceData.state = document | ||
.querySelector('.article-title') | ||
?.textContent | ||
?.trim() | ||
.replace('Revision history of ', '') | ||
.slice(1, -1) | ||
} | ||
else { | ||
presenceData.details = 'Searching for:' | ||
presenceData.state = decodeURIComponent( | ||
search.split('=')[1], | ||
).replace('&title', '') | ||
} | ||
break | ||
} | ||
default: { | ||
presenceData.state = document | ||
.querySelector('.article-title') | ||
?.textContent | ||
?.trim() | ||
break | ||
} | ||
} | ||
break | ||
} | ||
} | ||
|
||
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,24 +1,24 @@ | ||
{ | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"name": "Jackelele", | ||
"id": "377175513372033024" | ||
}, | ||
"service": "PERPHeads", | ||
"description": { | ||
"en": "An awesome Garry's Mod community", | ||
"nl": "Een geweldige Garry's Mod-community" | ||
}, | ||
"url": "perpheads.com", | ||
"regExp": "([a-z0-9-]+[.])*perpheads[.]com[/]", | ||
"version": "1.0.18", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/P/PERPHeads/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/P/PERPHeads/assets/thumbnail.png", | ||
"color": "#FFA500", | ||
"category": "games", | ||
"tags": [ | ||
"garrysmod", | ||
"perpheads" | ||
] | ||
} | ||
"$schema": "https://schemas.premid.app/metadata/1.12", | ||
"apiVersion": 1, | ||
"author": { | ||
"name": "Jackelele", | ||
"id": "377175513372033024" | ||
}, | ||
"service": "PERPHeads", | ||
"description": { | ||
"en": "An awesome Garry's Mod community", | ||
"nl": "Een geweldige Garry's Mod-community" | ||
}, | ||
"url": "perpheads.com", | ||
"regExp": "([a-z0-9-]+[.])*perpheads[.]com[/]", | ||
"version": "1.0.18", | ||
"logo": "https://cdn.rcd.gg/PreMiD/websites/P/PERPHeads/assets/logo.png", | ||
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/P/PERPHeads/assets/thumbnail.png", | ||
"color": "#FFA500", | ||
"category": "games", | ||
"tags": [ | ||
"garrysmod", | ||
"perpheads" | ||
] | ||
} |
Oops, something went wrong.