[Bootstrap] Add commented experimental code

This commit is contained in:
Ducko 2021-12-14 22:51:12 +00:00
parent 4c535cfb89
commit d09ce4a3d2

9
src/bootstrap.js vendored
View file

@ -38,6 +38,15 @@ const startCore = () => {
desktopCore = requireNative('discord_desktop_core'); desktopCore = requireNative('discord_desktop_core');
log('Bootstrap', 'Required desktop_core:', desktopCore); log('Bootstrap', 'Required desktop_core:', desktopCore);
/* const electronPath = require.resolve('electron'); // Patch webapp host version to suffix -openasar
const originalVersion = require.cache[electronPath].exports.app.getVersion();
require.cache[electronPath].exports.app.getVersion = function() {
const inDiscordNative = (new Error()).stack.includes('discord_native');
if (!inDiscordNative) return originalVersion;
return originalVersion + '-openasar';
}; */
desktopCore.startup({ desktopCore.startup({
paths, paths,
splashScreen, splashScreen,