mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-20 06:30:35 +00:00
Compare commits
37 commits
e85425bb50
...
91e95195f7
Author | SHA1 | Date | |
---|---|---|---|
|
91e95195f7 | ||
|
f62795da6d | ||
|
0d7ab0bcbf | ||
|
70ea0c92a8 | ||
|
d6390658b7 | ||
|
29de13fe4e | ||
|
d24afdaa20 | ||
|
cb4071a3ce | ||
|
70d49a97c9 | ||
|
255571653e | ||
|
a081ec8afd | ||
|
be5e2527aa | ||
|
52c3a55449 | ||
|
52d3c0afac | ||
|
162be49239 | ||
|
7d4f0e4c3e | ||
|
3f4e993329 | ||
|
5d64c6a081 | ||
|
e2c3c0655a | ||
|
d435e0a28e | ||
|
7c27cec573 | ||
|
120004874f | ||
|
d3e9230117 | ||
|
7134cdd4d1 | ||
|
6a617016a7 | ||
|
7bc3e03b52 | ||
|
a0262029e3 | ||
|
1fbfed635d | ||
|
610332e93d | ||
|
402cb1cad9 | ||
|
e648bf92e2 | ||
|
8b4fe6e95f | ||
|
b333deb731 | ||
|
3e58b70b98 | ||
|
36f809f8cf | ||
|
9afcb75358 | ||
|
bfea1edf63 |
3 changed files with 84 additions and 0 deletions
21
src/plugins/extraConnectionLinks/README.md
Normal file
21
src/plugins/extraConnectionLinks/README.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# ExtraConnectionLinks
|
||||
Allows you to open more connections in browser!
|
||||
|
||||
### Before
|
||||
![Shows the Roblox connection in the Discord client without the open profile button (the default).](https://github.com/Vendicated/Vencord/assets/73203995/734efd94-c61a-4f90-987d-3a4bbcc9311f)
|
||||
### After
|
||||
![Shows the Roblox connection in the Discord client with the open profile button.](https://github.com/Vendicated/Vencord/assets/73203995/eef59d09-78d9-4859-b722-242fc6aa7c8e)
|
||||
|
||||
## Platform Status
|
||||
### Supported Platforms
|
||||
* Xbox
|
||||
* Epic Games
|
||||
### Platforms that will never be supported
|
||||
* Riot Games (Nothing made by Riot Games to view profiles online)
|
||||
* League of Legends (Same as above since it's the same company)
|
||||
* Battle.net (Nothing made by Blizzard to view profiles online)
|
||||
* Bungie.net (Nothing made by Bungie.net to view profiles online)
|
||||
* PlayStation Network (Sony built a service called My PlayStation, but removed it for unknown reasons in 2021)
|
||||
* Facebook
|
||||
* Crunchyroll (can't view other peoples profiles nor your own profile)
|
||||
* Amazon Music (nothing references to the actual amazon music user id in discord.)
|
59
src/plugins/extraConnectionLinks/index.ts
Normal file
59
src/plugins/extraConnectionLinks/index.ts
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2024 Cooper/coopeeo, Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
/**
|
||||
* All the connection types implemented into this plugin
|
||||
*/
|
||||
enum connectionTypes {
|
||||
Roblox,
|
||||
Xbox,
|
||||
Epic,
|
||||
}
|
||||
|
||||
/**
|
||||
* The uri to use.
|
||||
* There are also two variables that you can use, name and id.
|
||||
* The "name" is what shows up when viewing a connection on a discord profile.
|
||||
* The "id" is the identifier of the account connected, the type depends on the service connected.
|
||||
* @example [connectionTypes.Xbox]: "https://www.xbox.com/play/user/${name}",
|
||||
* @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}",
|
||||
};
|
||||
|
||||
/**
|
||||
* What discord has the service named as.
|
||||
* @example [connectionTypes.Epic]: "Epic Games",
|
||||
*/
|
||||
const serviceNames = {
|
||||
//[connectionTypes.Roblox]: "Roblox",
|
||||
[connectionTypes.Xbox]: "Xbox",
|
||||
[connectionTypes.Epic]: "Epic Games",
|
||||
};
|
||||
|
||||
export default definePlugin({
|
||||
name: "ExtraConnectionLinks",
|
||||
description: "Allows you to open more connections in browser!",
|
||||
authors: [Devs.coopeeo],
|
||||
patches: Object.keys(connectionTypes)
|
||||
.filter(v => isNaN(Number(v)))
|
||||
.map(key => {
|
||||
const connectionTypeSelected = connectionTypes[key as keyof typeof connectionTypes];
|
||||
return {
|
||||
find: "getPlatformUserUrl:",
|
||||
replacement: {
|
||||
match: new RegExp("(r"),
|
||||
replace: `, getPlatformUserUrl:e=>{let {name, id} = e; return \`${uris[connectionTypeSelected]}\`;}`
|
||||
}
|
||||
};
|
||||
}),
|
||||
});
|
|
@ -531,6 +531,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
|
|||
name: "Antti",
|
||||
id: 312974985876471810n
|
||||
},
|
||||
coopeeo: {
|
||||
name: "Cooper",
|
||||
id: 594864203102158859n
|
||||
},
|
||||
Joona: {
|
||||
name: "Joona",
|
||||
id: 297410829589020673n
|
||||
|
|
Loading…
Reference in a new issue