diff --git a/lib/BetterDiscord.js b/lib/BetterDiscord.js index 10a3cc86..0ff0c81a 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'] + '" } })();');