1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-10 09:56:24 +00:00

Update index.ts (i may or may not be doing this on mobile)

This commit is contained in:
Cooper 2024-12-15 11:52:24 -06:00 committed by GitHub
parent 3a08d42cc4
commit e302011d49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,6 @@ import definePlugin from "@utils/types";
* All the connection types implemented into this plugin
*/
enum connectionTypes {
Roblox,
Xbox,
Epic,
}
@ -25,7 +24,6 @@ enum connectionTypes {
* @example [connectionTypes.Roblox]: "https://www.roblox.com/users/${id}/profile",
*/
const uris = { // name (what shows up on connection on ui), id (an identifier thing)
//[connectionTypes.Roblox]: "https://www.roblox.com/users/${id}/profile",
[connectionTypes.Xbox]: "https://www.xbox.com/play/user/${name}",
[connectionTypes.Epic]: "https://store.epicgames.com/u/${id}",
};
@ -35,7 +33,6 @@ const uris = { // name (what shows up on connection on ui), id (an identifier th
* @example [connectionTypes.Epic]: "Epic Games",
*/
const serviceNames = {
//[connectionTypes.Roblox]: "Roblox",
[connectionTypes.Xbox]: "Xbox",
[connectionTypes.Epic]: "Epic Games",
};
@ -51,7 +48,7 @@ export default definePlugin({
return {
find: "getPlatformUserUrl:",
replacement: {
match: new RegExp("(r"),
match: new RegExp(`(?<=${serviceNames[connectionTypeSelected]}",.*},.+)(?=},)`),
replace: `, getPlatformUserUrl:e=>{let {name, id} = e; return \`${uris[connectionTypeSelected]}\`;}`
}
};