mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-24 06:05:09 +00:00
don't put file path in custom url protocol
This commit is contained in:
parent
9ff6653503
commit
f7da64a0ed
2 changed files with 4 additions and 5 deletions
|
@ -25,7 +25,7 @@ if (IS_DEV) {
|
||||||
process.env.VENCORD_USER_DATA_DIR = DATA_DIR;
|
process.env.VENCORD_USER_DATA_DIR = DATA_DIR;
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
const { disableSmoothScroll, hardwareAcceleration } = Settings.store;
|
const { disableSmoothScroll, hardwareAcceleration, splashAnimationPath } = Settings.store;
|
||||||
|
|
||||||
if (hardwareAcceleration === false) app.disableHardwareAcceleration();
|
if (hardwareAcceleration === false) app.disableHardwareAcceleration();
|
||||||
if (disableSmoothScroll) {
|
if (disableSmoothScroll) {
|
||||||
|
@ -64,9 +64,8 @@ function init() {
|
||||||
registerMediaPermissionsHandler();
|
registerMediaPermissionsHandler();
|
||||||
|
|
||||||
//register file handler so we can load the custom splash animation from the user's filesystem
|
//register file handler so we can load the custom splash animation from the user's filesystem
|
||||||
protocol.registerFileProtocol("image", (request, callback) => {
|
protocol.registerFileProtocol("splash-animation", (request, callback) => {
|
||||||
const url = request.url.substring(8);
|
callback({path: splashAnimationPath});
|
||||||
callback({path: url});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|
|
@ -37,7 +37,7 @@ export function createSplashWindow(startMinimized = false) {
|
||||||
|
|
||||||
if (splashAnimationPath) {
|
if (splashAnimationPath) {
|
||||||
splash.webContents.executeJavaScript(`
|
splash.webContents.executeJavaScript(`
|
||||||
document.getElementById("animation").src = "image://${splashAnimationPath}";
|
document.getElementById("animation").src = "splash-animation://img";
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue