mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-10 18:06:22 +00:00
Update index.ts (i may or may not be doing this on mobile)
This commit is contained in:
parent
3a08d42cc4
commit
e302011d49
1 changed files with 2 additions and 5 deletions
|
@ -11,7 +11,6 @@ import definePlugin from "@utils/types";
|
||||||
* All the connection types implemented into this plugin
|
* All the connection types implemented into this plugin
|
||||||
*/
|
*/
|
||||||
enum connectionTypes {
|
enum connectionTypes {
|
||||||
Roblox,
|
|
||||||
Xbox,
|
Xbox,
|
||||||
Epic,
|
Epic,
|
||||||
}
|
}
|
||||||
|
@ -25,7 +24,6 @@ enum connectionTypes {
|
||||||
* @example [connectionTypes.Roblox]: "https://www.roblox.com/users/${id}/profile",
|
* @example [connectionTypes.Roblox]: "https://www.roblox.com/users/${id}/profile",
|
||||||
*/
|
*/
|
||||||
const uris = { // name (what shows up on connection on ui), id (an identifier thing)
|
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.Xbox]: "https://www.xbox.com/play/user/${name}",
|
||||||
[connectionTypes.Epic]: "https://store.epicgames.com/u/${id}",
|
[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",
|
* @example [connectionTypes.Epic]: "Epic Games",
|
||||||
*/
|
*/
|
||||||
const serviceNames = {
|
const serviceNames = {
|
||||||
//[connectionTypes.Roblox]: "Roblox",
|
|
||||||
[connectionTypes.Xbox]: "Xbox",
|
[connectionTypes.Xbox]: "Xbox",
|
||||||
[connectionTypes.Epic]: "Epic Games",
|
[connectionTypes.Epic]: "Epic Games",
|
||||||
};
|
};
|
||||||
|
@ -51,7 +48,7 @@ export default definePlugin({
|
||||||
return {
|
return {
|
||||||
find: "getPlatformUserUrl:",
|
find: "getPlatformUserUrl:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: new RegExp("(r"),
|
match: new RegExp(`(?<=${serviceNames[connectionTypeSelected]}",.*},.+)(?=},)`),
|
||||||
replace: `, getPlatformUserUrl:e=>{let {name, id} = e; return \`${uris[connectionTypeSelected]}\`;}`
|
replace: `, getPlatformUserUrl:e=>{let {name, id} = e; return \`${uris[connectionTypeSelected]}\`;}`
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue