Add theme support variabl
This commit is contained in:
parent
8dafff1b34
commit
a88fd77fd6
10
splice
10
splice
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue