This commit is contained in:
Samuel Elliott 2019-04-06 08:46:36 +00:00 committed by GitHub
commit 54e5450020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 83 additions and 38 deletions

View File

@ -38,7 +38,7 @@
"id": "debugger-keybind",
"type": "keybind",
"text": "Debugger keybind",
"hint": "Open developer tools and pause"
"hint": "Open developer tools and pause."
},
{
"id": "ignore-content-manager-errors",
@ -51,14 +51,14 @@
"id": "react-devtools",
"type": "bool",
"text": "React Developer Tools",
"hint": "Place extension in ext/extensions/rdt",
"hint": "Place extension in ext/extensions/rdt. You can download the extension from the Chrome Web Store or from https://github.com/facebook/react-devtools/releases/download/3.4.2/chrome-extension.zip.",
"value": false
},
{
"id": "vue-devtools",
"type": "bool",
"text": "Vue Developer Tools",
"hint": "Place extension in ext/extensions/vdt",
"hint": "Place extension in ext/extensions/vdt. You can download the extension from the Chrome Web Store.",
"value": false
}
]

View File

@ -6,9 +6,9 @@
],
"style-src": [
"https://fonts.googleapis.com"
],
],
"script-src": [
"'sha256-fSHKdpQGCHaIqWP3SpJOuUHrLp49jy4dWHzZ/RBJ/p4='",
"'sha256-X/Vxe0xwD5NYeow8fOCVjqJUWNTO7SDq8P9C4N88/cM='",
"'sha256-VFJcfKY5B3EBkFDgQnv3CozPwBlZcxwssfLVWlPFfZU='",
"'sha256-VzDmLZ4PxPkOS/KY7ITzLQsSWhfCnvUrNculcj8UNgE='",
"'sha256-l6K+77Z1cmldR9gIvaVWlboF/zr5MXCQHcsEHfnr5TU='"

View File

@ -1,3 +1,5 @@
React Devtools: sha256-fSHKdpQGCHaIqWP3SpJOuUHrLp49jy4dWHzZ/RBJ/p4=
React Devtools [v3.4.2](https://github.com/facebook/react-devtools/releases/tag/3.4.2):
sha256-X/Vxe0xwD5NYeow8fOCVjqJUWNTO7SDq8P9C4N88/cM=
Vue Devtools: sha256-VFJcfKY5B3EBkFDgQnv3CozPwBlZcxwssfLVWlPFfZU=
Vue Detector: sha256-l6K+77Z1cmldR9gIvaVWlboF/zr5MXCQHcsEHfnr5TU=

View File

@ -240,8 +240,9 @@ export class BetterDiscord {
async init() {
console.log('[BetterDiscord] init');
await this.waitForWindowUtils();
await this.ensureDirectories();
await this.waitForWindowUtils();
this.windowUtils.on('did-finish-load', () => this.injectScripts(true));

View File

@ -17,8 +17,6 @@ import electron, { ipcRenderer } from 'electron';
console.log('[BetterDiscord|Sparkplug]');
electron.webFrame.registerURLSchemeAsPrivileged('chrome-extension');
const currentWindow = electron.remote.getCurrentWindow();
if (currentWindow.__bd_preload) {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -3,12 +3,12 @@
PLATFORM="darwin"
ARCH="x64"
NODE_API_VERSION="64"
ELECTRON_VERSION="4.0.0-beta.11"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="69"
ELECTRON_VERSION="4.0.8"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="68"
ELECTRON_VERSION="5.0.0-beta.8"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION

View File

@ -3,12 +3,12 @@
PLATFORM="linux"
ARCH="x64"
NODE_API_VERSION="64"
ELECTRON_VERSION="4.0.0-beta.11"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="69"
ELECTRON_VERSION="4.0.8"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="68"
ELECTRON_VERSION="5.0.0-beta.8"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION

View File

@ -0,0 +1,11 @@
set "PLATFORM=win32"
set "NODE_API_VERSION=69"
set "ELECTRON_VERSION=4.0.8"
call ./scripts/build-keytar.bat %PLATFORM% ia32 %NODE_API_VERSION% %ELECTRON_VERSION%
set "NODE_API_VERSION=68"
set "ELECTRON_VERSION=5.0.0-beta.8"
call ./scripts/build-keytar.bat %PLATFORM% ia32 %NODE_API_VERSION% %ELECTRON_VERSION%

30
scripts/build-keytar.bat Normal file
View File

@ -0,0 +1,30 @@
@echo off
set "PLATFORM=%1"
set "ARCH=%2"
set "NODE_API_VERSION=%3"
set "ELECTRON_VERSION=%4"
set "KEYTAR_VERSION=4.4.1"
set "ELECTRON_URL=https://atom.io/download/electron"
set "DIRECTORY=.\release-tmp\keytar.node\keytar-%KEYTAR_VERSION%"
set "FILENAME=%PLATFORM%-%ARCH%-%NODE_API_VERSION%.node"
cd .\node_modules\keytar
move .\build\Release .\release-tmp
if exist %DIRECTORY%\%FILENAME% (
echo A binding already exists at %DIRECTORY%\%FILENAME% - deleting it
del %DIRECTORY%\%FILENAME%
)
echo Building keytar for %PLATFORM%-%ARCH% with Node.js API version %NODE_API_VERSION% for Electron %ELECTRON_VERSION%
call ..\.bin\node-gyp rebuild --target=%ELECTRON_VERSION% --arch %ARCH% --dist-url=%ELECTRON_URL%
echo Moving keytar.node to %DIRECTORY%
mkdir %DIRECTORY%
move .\build\Release\keytar.node %DIRECTORY%\%FILENAME%
del /S /Q .\build\Release\*
move .\release-tmp\keytar.node .\build\Release

View File

@ -3,12 +3,12 @@
PLATFORM="darwin"
ARCH="x64"
NODE_API_VERSION="64"
ELECTRON_VERSION="4.0.0-beta.11"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="69"
ELECTRON_VERSION="4.0.8"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="68"
ELECTRON_VERSION="5.0.0-beta.8"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION

View File

@ -3,12 +3,12 @@
PLATFORM="linux"
ARCH="x64"
NODE_API_VERSION="64"
ELECTRON_VERSION="4.0.0-beta.11"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="69"
ELECTRON_VERSION="4.0.8"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="68"
ELECTRON_VERSION="5.0.0-beta.8"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION

View File

@ -1,13 +1,13 @@
set "PLATFORM=win32"
set "NODE_API_VERSION=64"
set "ELECTRON_VERSION=4.0.0-beta.11"
call ./scripts/build-node-sass.bat %PLATFORM% ia32 %NODE_API_VERSION% %ELECTRON_VERSION%
call ./scripts/build-node-sass.bat %PLATFORM% x64 %NODE_API_VERSION% %ELECTRON_VERSION%
set "NODE_API_VERSION=69"
set "ELECTRON_VERSION=4.0.8"
call ./scripts/build-node-sass.bat %PLATFORM% ia32 %NODE_API_VERSION% %ELECTRON_VERSION%
call ./scripts/build-node-sass.bat %PLATFORM% x64 %NODE_API_VERSION% %ELECTRON_VERSION%
set "NODE_API_VERSION=68"
set "ELECTRON_VERSION=5.0.0-beta.8"
call ./scripts/build-node-sass.bat %PLATFORM% ia32 %NODE_API_VERSION% %ELECTRON_VERSION%
call ./scripts/build-node-sass.bat %PLATFORM% x64 %NODE_API_VERSION% %ELECTRON_VERSION%

View File

@ -4,11 +4,14 @@ set "ELECTRON=%4"
set "PLATFORM=%1"
set "ARCH=%2"
set "VER=%3"
set "VENDOR_PATH=.\node_modules\node-sass\vendor"
set "BUILD_PATH=.\node_modules\node-sass\build\Release\binding.node"
set "ELECTRON_URL=https://atom.io/download/electron"
set "VENDOR_PATH=.\vendor"
set "BUILD_PATH=.\build\Release\binding.node"
cd .\node_modules\node-sass
echo Building %PLATFORM%-%ARCH% bindings
call ./node_modules/.bin/electron-rebuild -v=%ELECTRON% -a=%ARCH% -m ./node_modules/node-sass
call ../.bin/node-gyp rebuild --target=%ELECTRON% --arch %ARCH% --dist-url=%ELECTRON_URL%
if exist %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER%\binding.node (
echo Deleting old %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER%\binding.node