From e29ed07c496bde4fe4fb87daa41a77ad48ee429c Mon Sep 17 00:00:00 2001 From: Flex Date: Wed, 13 Dec 2017 13:53:01 -0700 Subject: [PATCH] lol who needs buffers --- channels/@me/cynergy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channels/@me/cynergy.js b/channels/@me/cynergy.js index aac6059..3d45f2c 100644 --- a/channels/@me/cynergy.js +++ b/channels/@me/cynergy.js @@ -107,9 +107,9 @@ var new_injector = function () { //Until they remove this listener, we'll be replacing it for now, later we'll readd it. let dirlisting = _fs.readdirSync(data()); let latestver = dirlisting.filter(d=>d.indexOf("0.0.") > -1); - let mainScreen = _fs.readFileSync(`${data()}/${latestver[latestver.length-1]}/modules/discord_desktop_core/app/mainScreen.js`); + let mainScreen = _fs.readFileSync(`${data()}/${latestver[latestver.length-1]}/modules/discord_desktop_core/app/mainScreen.js`).toString(); - mainScreen.write(`mainWindow.webContents.on('dom-ready', function () {require('../../../../cynergy/i.js').x(mainWindow)});//`, mainScreen.indexOf("mainWindow.webContents.on('dom-ready', function () {});\x0A\x0A // Prevent navigation whe")); + mainScreen = mainScreen.replace("mainWindow.webContents.on('dom-ready', function () {});",`mainWindow.webContents.on('dom-ready', function () {require('../../../../cynergy/i.js').x(mainWindow)});`); _fs.writeFileSync(`${data()}/${latestver[latestver.length-1]}/modules/discord_desktop_core/app/mainScreen.js`,mainScreen); }