Add theme support variabl

This commit is contained in:
Jiiks 2015-12-15 08:37:10 +02:00
parent 8dafff1b34
commit a88fd77fd6
1 changed files with 6 additions and 8 deletions

10
splice
View File

@ -18,8 +18,7 @@
console.log('BetterDiscord: Creating Themes Dir');
fs.mkdirSync(_dataPath + "themes/");
}
mainWindow.webContents.executeJavaScript('var themesupport = true');
fs.readdir(_dataPath + "plugins/",function(err,files) {
if (err) { console.log(err); return; }
@ -40,7 +39,6 @@
});
});
fs.readdir(_dataPath + 'themes/', function(err, files) {
if (err) { console.log(err); return; }
mainWindow.webContents.executeJavaScript('var bdthemes = {};');
@ -55,9 +53,9 @@
var themeVar = meta.substring(meta.lastIndexOf('//META')+6, meta.lastIndexOf('*//'));
var parse = JSON.parse(themeVar);
var themeName = parse['name'];
var themeAuthor = parse['author'];
var themeDescription = parse['description'];
var themeVersion = parse['version'];
var themeAuthor = parse['author'];
var themeDescription = parse['description'];
var themeVersion = parse['version'];
console.log('BetterDiscord: Loading Theme: ' + themeName);
split.splice(0, 1);
theme = split.join('\n');