Skip to content

Commit

Permalink
Update documentation/comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacingBat3 committed Feb 25, 2022
1 parent 36c34ff commit 8a55b01
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 24 deletions.
49 changes: 39 additions & 10 deletions docs/Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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 |
Expand All @@ -34,22 +34,25 @@ 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) |


<sub> **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. </sub>
you are talented enough, you could also implement them yourself and do a Pull
Request. </sub>

### State legend:

- ❌️ **TODO** – this feature **may** or **may not** be implemented in the future.
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. -->
- ⚠️ **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.
Expand All @@ -67,6 +70,32 @@ you wish to you could also add them yourself and do a Pull Request. </sub>

- 🚧️ ***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"
10 changes: 6 additions & 4 deletions docs/Files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/`):
Expand All @@ -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
Expand Down
16 changes: 7 additions & 9 deletions docs/Privacy.md
Original file line number Diff line number Diff line change
@@ -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.
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.
2 changes: 1 addition & 1 deletion sources/code/main/modules/extensions.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 8a55b01

Please sign in to comment.