From bdf889e14f387a18d2054e1883c4cc4129e6af27 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Sat, 7 May 2016 00:44:48 +0300 Subject: [PATCH] Fixed a eol bug --- lib/BetterDiscord.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/BetterDiscord.js b/lib/BetterDiscord.js index 10a3cc8..0ff0c81 100644 --- a/lib/BetterDiscord.js +++ b/lib/BetterDiscord.js @@ -451,7 +451,7 @@ function loadThemes() { return; } var theme = _fs.readFileSync(themePath + fileName, 'utf8'); - var split = theme.split(_eol); + var split = theme.split("\n"); var meta = split[0]; if(meta.indexOf('META') < 0) { getUtils().warn("Theme META not found in file: " + fileName); @@ -488,7 +488,7 @@ function loadThemes() { getUtils().log("Loading theme: " + themeInfo['name']); split.splice(0, 1); - theme = split.join(_eol); + theme = split.join("\n"); theme = theme.replace(/(\r\n|\n|\r)/gm, ''); _mainWindow.webContents.executeJavaScript('(function() { bdthemes["' + themeInfo['name'] + '"] = { "enabled": false, "name": "' + themeInfo['name'] + '", "css": "' + escape(theme) + '", "description": "' + themeInfo['description'] + '", "author":"' + themeInfo['author'] + '", "version":"' + themeInfo['version'] + '" } })();');