From 8a55b01c06a9c6e7005bc373ec24d74e2aa75285 Mon Sep 17 00:00:00 2001 From: SpacingBat3 Date: Fri, 25 Feb 2022 22:53:04 +0100 Subject: [PATCH] Update documentation/comments. --- docs/Features.md | 49 ++++++++++++++++++++----- docs/Files.md | 10 +++-- docs/Privacy.md | 16 ++++---- sources/code/main/modules/extensions.ts | 2 +- 4 files changed, 53 insertions(+), 24 deletions(-) diff --git a/docs/Features.md b/docs/Features.md index 39280d35..da5f0893 100644 --- a/docs/Features.md +++ b/docs/Features.md @@ -7,7 +7,7 @@ browser), it has similar features and limitations like Discord Web application. However, WebCord client is capable of doing some tweaks to it, implementing following list of the features: -| Name | Description | State | +| Name | Description | State / Notes | | --- | --- | --- | | Tray icon | Hiding aplication in the tray. | ✅️ Done | | Red badge (tray) | Display indicator at DM or mentions on tray icon. | ✅️ Done | @@ -16,8 +16,8 @@ following list of the features: | Custom dictonary languages | Customize the language set used for the autocompletition feature | ❌️ **TODO** | | Translations | WebCord's localization support for multiple languages. | 2️⃣️ ***Beta*** | | Hiding the Discord's side bar | Switching the visibility state of side bar containing channel list. This makes WebCord working on the devices with the smaller screens, like e.g. PinePhone smartphones. | ✅️ Done | -| Node.js-based WebCord extensions support | WebCord-specific addon implementation that allows for using Node dependencies. | 1️⃣ ***Alpha*** (works for *developers*) | -| Chromium-based extensions support | Chromium browser addon support. | 1️⃣ ***Alpha*** (does not work) | +| Node.js-based WebCord extensions support | WebCord-specific addon implementation that allows for using Node dependencies. | ⚠️ **Will do** | +| Chromium-based extensions support | Chromium browser addon support. | 1️⃣ ***Alpha*** (experimental implementation) | | Addon permisions management | Limits the permissions of the extensions for the security reasons. | ❌️ **TODO** | | Global shortcut for push-to-talk | Makes the shortcut for PTT globally available. | ❌️ **TODO** | | Block `/science` and `/tracing` API endpoints | Implement blocking of some known tracing methods in Discord. | ✅️ Done | @@ -34,13 +34,16 @@ following list of the features: | Permission management | Lets you dedide what Discord can do and what it can't. | ✅️ Done | | Custom Discord instances | Allows to use different Discord instances, e.g. Fosscord. | 1️⃣ ***Alpha*** | | Hide download buttons/popups | Hide elements reffering to official Discord client download link | ✅️ Done | -| ~~Easter Eggs~~ | You've seen nothing! | N/A? +| HTML-based *about* panel | Non-native window showing the information about the application, like licenses, versions or credits. | 2️⃣ ***Beta*** (it's actively improved) | +| Custom Discord and WebCord styles | Allow styling Discord and WebCord with own themes. | 1️⃣ ***Alpha*** (Discord can be styled) | + **NOTE:** Please report bugs for the features listed above. If your issue describes a feature that is not on the list, you may consider opening a **feature request**. If some of the implemented app's features are missing there, feel free to inform me about that in the *Issues* or *Discussions*. If -you wish to you could also add them yourself and do a Pull Request. +you are talented enough, you could also implement them yourself and do a Pull +Request. ### State legend: @@ -48,8 +51,8 @@ you wish to you could also add them yourself and do a Pull Request. It's in *concept* state – there's nothing implemented about it and it might not be implemented soon, even if it is ever planned to be done. - +- ⚠️ **Will do** – there's nothing implemented in code about this feature, but it + is planned as a next feature to be worked on. - 1️⃣ ***Alpha*** – the work on implementing this feature has already begun, but it's still far from being finished. @@ -67,6 +70,32 @@ you wish to you could also add them yourself and do a Pull Request. - 🚧️ ***Under construction*** – A major rewrite around this feature is in progress to improve it. - - - **N/A** – either there's not known state for this feature or its state cannot - be described with phrases listed above. + +--- + +### Experimental features + +Here are some notes about the features that are still not visibly implemented +and are far from being called *user-friendly*. Things are meant here to be +broken, so don't expect you will be able to use them as you intent to. + +#### 1. Custom Discord Styles + +From version `3.0.0`, WebCord is capable of styling Discord pages, yet the +implementation is still very limited and most of existing themes are not +functional yet. + +You can apply themes by creating a file in `{userData}/Themes/{theme name}/index.css` +as for now. + +#### 2. Chromium Extensions + +From version `3.0.0`, an experimenal Chromium extensions support has been +implemented using Electron's [Chrome Extension Support][chrome-ext]. As Electron's +implementation of Chromium extensions is far from the one in Chromium, a lot of +the extensions may not be fully functional or not work at all. + +You can load Chromium extensions by extracting them from `.crx` archive to +`{userData}/Extensions/Chromium/{extension name}/` folder. + +[chrome-ext]: https://www.electronjs.org/docs/latest/api/extensions "Chrome Extension Support | Electron's online documentation" \ No newline at end of file diff --git a/docs/Files.md b/docs/Files.md index d2fcde6b..21347aac 100644 --- a/docs/Files.md +++ b/docs/Files.md @@ -147,7 +147,7 @@ Here's more detailed description of what's been already discussed above: - `main.ts` – a preload script for `mainWindow`, basically loads `capturer.ts` and `cosmetic.ts` scripts described in - the previous section. + the next sections. - `settings.ts` – a front-end script for the WebCord's settings manager; it communicates via the IPC to load and fetch the configuration from the @@ -159,6 +159,9 @@ Here's more detailed description of what's been already discussed above: - `about.ts` – it is responsible for loading the *About* window content based on the translation files and pre-definied HTML file structure. + - `capturer.ts` – communicates with screen capturer BrowserView to show window + list and send chosen source back to the Discord using IPC. + --- ### Application modules (`*/modules/`): @@ -177,9 +180,8 @@ Here's more detailed description of what's been already discussed above: #### Renderer process modules (`renderer/modules/`) - - `capturer.ts` – contains the implementation of the - `desktopCapturer` interface, used for implementing a screen share support - for Discord. + - `capturer.ts` – sends the request to `main.ts` using IPC and waits for it + to respond with chosen source. - `cosmetic.ts` – does some cosmetic changes to the Discord website, removing from it some unnecesary content like the application diff --git a/docs/Privacy.md b/docs/Privacy.md index c9cba68b..f091d889 100644 --- a/docs/Privacy.md +++ b/docs/Privacy.md @@ -1,12 +1,10 @@ ## Privacy Policy + This software **does not** share any data to its owner/maintainers – user configuration, session details and cookies are saved locally. However because -this software connects to [Discord website](https://discord.com/app), it is -expected that the user accepts -[Discord's Privacy Policy](https://discord.com/privacy) when using this -application and registering/logging in to the service. - -In the future, following application may ask the user if he want to report an -issue on GitHub when the crash occurs. This feature, however, won't -automatically send any details and will popup a website with bug report preview -to let user decide if he wants to change anything and/or send bug report. \ No newline at end of file +this software connects to [Discord website](https://discord.com/app) as well as +Fosscord instances (depending on user selection), the application may share some +data or even track you depending on the WebCord's configuration. By default, +WebCord tries to protect the user privacy and does not grant sensitive +permissions as well as mitigate the tracing by blocking some of the unnecesary +request made by the client itself. \ No newline at end of file diff --git a/sources/code/main/modules/extensions.ts b/sources/code/main/modules/extensions.ts index 8c5c4e85..fc0fef6a 100644 --- a/sources/code/main/modules/extensions.ts +++ b/sources/code/main/modules/extensions.ts @@ -1,7 +1,7 @@ import { commonCatches } from "./error"; /** - * Loads CSS styles from `${userdata}/styles` directory and observes their changes. + * Loads CSS styles from `${userdata}/Themes` directory and observes their changes. * * On Windows and MacOS, entire directory is watched recursively for changes, so * new themes will apply immediatelly after they're updated. On other platforms,