SpacingBat3 / WebCord

A Discord and SpaceBar :electron:-based client implemented without Discord API.
MIT License
1.88k stars 94 forks source link

Implement Vencord's fake nitro plugin #394

Closed BeyondThe5D closed 1 year ago

BeyondThe5D commented 1 year ago

Would be pretty swag if this was an option, I believe it just spoofs nitro, apparently lets you stream in HD and use custom emojis in other servers https://github.com/Vendicated/Vencord/blob/main/src/plugins/fakeNitro.ts

raidenovich commented 1 year ago

It's possible to inject Vencord into Webcord and other Web based clients, I'm not sure how but over on the discord-screenaudio side, the maintainer managed to do it. https://github.com/maltejur/discord-screenaudio/issues/59#issuecomment-1275068867

I asked him how to do it and once he replies (or doesn't) we will know the procedure. It should be the same since both clients are essentially a chromium wrapper.

MrM0der commented 1 year ago

I think you can add support for Chrome extensions to your application. The fact is that Vencord (like many others) comes as an extension for Chrome.

SpacingBat3 commented 1 year ago

I think you can add support for Chrome extensions to your application. The fact is that Vencord (like many others) comes as an extension for Chrome.

…except extensions support on Electron is nowhere close to what's on Chromium – in fact, a lot of features in Electron are its own thing as Electron removes Chrome-specific parts of the engine, including the extensions.

I asked him how to do it and once he replies (or doesn't) we will know the procedure. It should be the same since both clients are essentially a chromium wrapper.

I believe the Chromium engine both in QtWebEngine and Electron is heavily stripped off many unnecessary features which might only make sense for browsers, but not web applications. In Electron, extensions implementation was basically designed in mind for DevTools extensions and stuff like React debugging. Therefore an API support might also be very limited and some extensions might not work at all, especially those based on manifest V3 as I suppose Electron doesn't support them now.


I might also plan to allow for unprivileged script injection by allowing loading the scripts inside some directory in app.asar. Take a note these might run in it's own isolated context, so messing with global variables might not be possible as these will be only valid for the specific context.

Anyway, that's essentially a better extension support, I don't want to support integration with any specific third-party mods, neither integrate or mess with Nitro features in any way (I won't add directly to WebCord any custom emoji / nitro-exclusive feature, neither to exploit / workaround anything Discord does not allow for non-Nitro users). I close this issue for this reason.