Adds some more finishing touches

This commit is contained in:
Zack Rauen 2020-07-26 19:11:16 -04:00
parent 0f45dc6e22
commit cea1ba5a30
6 changed files with 161 additions and 68 deletions

0
.github/FUNDING.yml vendored Normal file
View File

View File

@ -8,7 +8,7 @@ git:
branches:
only:
- development
- stable
install:
- npm install
@ -27,4 +27,4 @@ deploy:
name: BetterDiscord Deployment
target_branch: gh-pages
on:
branch: development
branch: stable

View File

@ -178,7 +178,7 @@ import {deepclone, isEmpty} from "./utilties"; // Avoid this
### CSS Styleguide
All CSS must adhere to the [Stylelint rules](https://github.com/rauenzi/BetterDiscordApp/blob/development/.stylelintrc) of the repo.
All CSS must adhere to the [Stylelint rules](https://github.com/rauenzi/BetterDiscordApp/blob/stable/.stylelintrc) of the repo.
Some other style related points not covered by ESLint:

183
README.md
View File

@ -1,4 +1,4 @@
# BandagedBD [![Build Status][travis-badge]][travis-link] ![Netlify][netlify-badge] [![Language Grade][lgtm-badge]][lgtm-link] ![GitHub Releases][downloads-badge]
# BandagedBD [![Build Status][travis-badge]][travis-link] [![Language Grade][lgtm-badge]][lgtm-link] ![GitHub Releases][downloads-badge]
[patreon-badge]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.herokuapp.com%2FZerebos&style=flat-square
[patreon-link]: https://patreon.com/Zerebos
@ -12,45 +12,164 @@
[travis-badge]: https://img.shields.io/travis/com/rauenzi/BetterDiscordApp.svg?style=flat-square&branch=development
[travis-link]: https://travis-ci.com/rauenzi/BetterDiscordApp
[netlify-badge]: https://img.shields.io/netlify/0c2be7e5-9327-4243-a2bf-68272c00c253?style=flat-square
[downloads-badge]: https://img.shields.io/github/downloads/rauenzi/BetterDiscordApp/latest/total?style=flat-square
<!-- [![Netlify Status](https://api.netlify.com/api/v1/badges/0c2be7e5-9327-4243-a2bf-68272c00c253/deploy-status)](https://app.netlify.com/sites/vigorous-visvesvaraya-98a425/deploys) -->
[![Patreon][patreon-badge]][patreon-link] [![Paypal][paypal-badge]][paypal-link]
This branch is for the ongoing rewrite of BandagedBD. You can view what I believe to be left in the TODO.md file.
BetterDiscord is a client modification for Discord. This allows you to add plugins and themes to your personal copy of Discord. BetterDiscord also adds a number of other features out of the box.
# Testing
# Installation
The following steps tell you how you can currently test the state of the rewrite as of April 23rd 2020.
## Auto Installers
1. locate your BD installation. For Windows it is usually in `%localappdata%\Discord\app-0.0.306\resources\app\betterdiscord`.
2. Open config.json in a text editor (n++, notepad, etc).
3. Change the line `"branch": "master",` to `"branch": "development",`.
4. (optional) Change `"minified": true,` to `"minified": false,` to stay on the bleeding edge (sometimes I forget to update the minified version).
5. Fully restart your Discord client.
6. You can verify it worked by seeing the revamped plugins and themes pages as well as custom css. You can also see if the version in settings is 1.0.0+
### Windows
Grab the `exe` file from [here](https://github.com/rauenzi/BetterDiscordApp/releases/latest/download/BandagedBD_Windows.exe).
## Script Version
### macOS/OS X
Grab the `zip` file from [here](https://github.com/rauenzi/BetterDiscordApp/releases/latest/download/BandagedBD_Mac.zip).
The above can be automatically done in script form.
```js
((branch = "development", minified = false) => {
try {
const fs = require("fs");
const path = require("path");
const configPath = path.join(DataStore.injectionPath, "betterdiscord", "config.json");
const config = require(configPath);
config.branch = branch;
config.minified = minified;
console.log(config);
fs.writeFileSync(configPath, JSON.stringify(config, null, 4));
const app = require("electron").remote.app;
app.relaunch();
app.exit();
}
catch (err) {console.error(err);}
})("development", false);
### Linux
See this [gist](https://gist.github.com/ObserverOfTime/d7e60eb9aa7fe837545c8cb77cf31172).
## Manual Installation
### Windows
1. Download and extract this: https://github.com/rauenzi/BetterDiscordApp/archive/injector.zip
2. Rename `BetterDiscordApp-injector` to `app`.
3. Go to `%localappdata%\Discord\`, and locate the directory with the largest version number (e.g. `app-0.0.306`).
4. Within `app-0.0.306` navigate to `resources`.
5. If an `app` folder already exists inside `resources`, delete it.
6. Move the `app` folder (the one you downloaded and renamed) inside of `resources`.
7. Fully quit Discord and restart it.
### macOS/OS X
1. Download and extract this: https://github.com/rauenzi/BetterDiscordApp/archive/injector.zip
2. Rename `BetterDiscordApp-injector` to `app`.
3. Go to `/Applications/`, right click `Discord.app` and select `Show Package Contents`.
4. Within `Discord.app` navigate to `Contents` -> `Resources`.
5. If an `app` folder already exists inside `Resources`, delete it.
6. Move the `app` folder (the one you downloaded and renamed) inside of `Resources`.
7. Fully quit Discord and restart it.
# FAQ
### What is this?
This is a client modification for Discord. It allows you to add plugins and themes to your client. Plugins can add functionality and useful features. Themes can completely change the look and feel of Discord.
BBD has some other built-in features such as Emotes from Twitch, FFZ, and BBTV, as well as an in-client server browser.
### Where can I get plugins and themes?
In our support servers we have channels with lists of official plugins and themes. Please note we do not have an official listing on a website and are **not affiliated with any of those websites**.
### Support Servers?
There are two: [The main server](https://discord.gg/0Tmfo5ZbORCRqbAd), and [the backup](https://discord.gg/2HScm8j).
# Supporters
These people have all subscribed to the `True Supporter` tier on Patreon to support me.
<table>
<tr>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/196098063092154368/90f1a7202955dac7a6c685cca3181ab1.webp" width="100px;" alt="Kraken"/><br />
<strong>Kraken</strong><br />
</td>
<td align="center">
<img src="https://cdn.discordapp.com/attachments/585514483699417089/585552300354043915/34959069_500_500.jpg" width="100px;" alt="SPHHAX"/><br />
<a href="http://sphh.ax/" target="_blank" rel="noreferrer noopener"><strong>SPHHAX</strong></a><br />
</td>
<td align="center">
<img src="https://cdn.discordapp.com/attachments/622954403262889995/622957122765848587/5364774.jpg" width="100px;" alt="DefCon42"/><br />
<a href="https://twitter.com/def_con42" target="_blank" rel="noreferrer noopener"><strong>DefCon42</strong></a><br />
</td>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/629231564261425163/a_36cc7d2940b4ffb8a660b1076ab2087f.webp" width="100px;" alt="Justxn"/><br />
<strong>Justxn</strong><br />
</td>
<td align="center">
<img src="https://cdn.discordapp.com/attachments/682750073448169513/682763113296429087/definitely_not_the_dick_police.png" width="100px;" alt="monkey"/><br />
<a href="https://heartunderbla.de" target="_blank" rel="noreferrer noopener"><strong>monkey</strong></a><br />
</td>
<td align="center">
<img src="https://avatars3.githubusercontent.com/u/20338746?s=460&u=d9ebab4f6f0f5221390bca1eaf8f191acd275afe&v=4" width="100px;" alt="Gibbu"/><br />
<a href="https://github.com/Gibbu" target="_blank" rel="noreferrer noopener"><strong>Gibbu</strong></a>
</td>
<td align="center">
<img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/25717114/c100599e58174499b44b4307c26f9312/1.jpeg" width="100px;" alt="Orekieh"/><br />
<strong>Orekieh</strong>
</td>
</tr>
</table>
# Bandagers
These people have all subscribed to the `Bandager` tier on Patreon to support me.
<table>
<tr>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/332199319169925120/4709f8f0c9cb7ababd85459bf71848b9.png" width="50px;" alt="William JCM"/><br />
<a href="https://github.com/williamjcm" target="_blank" rel="noreferrer noopener"><strong>William JCM</strong></a>
</td>
<td align="center">
<img src="https://avatars0.githubusercontent.com/u/24623601" width="50px;" alt="NFLD99"/><br />
<a href="https://github.com/NFLD99" target="_blank" rel="noreferrer noopener"><strong>NFLD99</strong></a>
</td>
<td align="center">
<img src="https://i.postimg.cc/5NVxqMnb/Cute-Squid-Circle.png" width="50px;" alt="Tenuit"/><br />
<strong>Tenuit</strong>
</td>
</tr>
</table>
# Donors
These people have either donated or subscribed to the most basic patron tier to support me.
<table>
<tr>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/284122164582416385/ebaa1b63191ce70e48ae24f32f452773.webp" width="25px;" /><br />
<strong>aetheryx</strong>
</td>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/216782345779281921/d4b651b606f108cd2f96a19af68f942f.png" width="25px;" /><br />
<strong>JBeauDee</strong>
</td>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/261673576216789004/31d590fb92329e270a6225a13d500c1d.png" width="25px;" /><br />
<strong>vantiss</strong>
</td>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/122204411962327043/7f44a9b036b9e2691f4e81d9e34a78b4.webp" width="25px;" /><br />
<strong>xstefen</strong>
</td>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/219400174869413888/7c88015869990ba97b614b1ac784f8e8.png" width="25px;" /><br />
<strong>『Sorey』</strong>
</td>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/95263213842608128/5024b83e1bff3096d7fc93e8de09d582.gif" width="25px;" /><br />
<strong>LiVeR</strong>
</td>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/144458450192171008/13a3e66d73d216974504b8aad257b7b4.png" width="25px;" /><br />
<strong>SweetLilyCake</strong>
</td>
<td align="center">
<img src="https://cdn.discordapp.com/avatars/398951709336010793/eb6f63eb2f3a5102fb900e60d1a26cdc.png" width="25px;" /><br />
<strong>GameKuchen</strong>
</td>
<td align="center">
<img src="https://i.imgur.com/qrWcKfH.png" width="25px;" /><br />
<strong>Lozo</strong>
</td>
<td align="center">
<img src="https://media.discordapp.net/attachments/575576868166828032/692136786893340752/pfp.gif" width="25px;" /><br />
<strong>Akira</strong>
</td>
</tr>
</table>

27
TODO.md
View File

@ -1,27 +0,0 @@
# To-Do List
This list only reflects the items that have needed to be done since July 23 2020, there was a lot of progress/change before this point.
Note: The items listed here are not in any sort of priority order.
### To Do (Remote Side)
- Transition code
### To Do (Injector)
- Expand ipc/config commands
- Move more to preload
### To Do (Meta)
- Update README (info, patrons)
- Add issue template
- Add gh funding
### Someday
- Move old utilities to BdApi
- Component patcher (also does additional classes, etc)
- Plugin Class
- New Plugin API
- Require patch
- Repo browser
- Addon update system
- Modify CSP rather than entirely remove or use privileged scheme

View File

@ -221,12 +221,13 @@ export default class Modals {
renderFooter: renderFooter,
}, props), changelogItems);
});
const closeModal = ModalActions.closeModal;
ModalActions.closeModal = function(k) {
if (k !== key) Reflect.apply(closeModal, this, arguments);
setTimeout(() => {if (originalRoot) OriginalModalClasses.root = originalRoot;}, 1000);
ModalActions.closeModal = closeModal;
};
const closeModal = ModalActions.closeModal;
ModalActions.closeModal = function(k) {
Reflect.apply(closeModal, this, arguments);
setTimeout(() => {if (originalRoot && k === key) OriginalModalClasses.root = originalRoot;}, 1000);
ModalActions.closeModal = closeModal;
};
return key;
}
}