aboutsummaryrefslogtreecommitdiffstats
path: root/stylechanger.js
diff options
context:
space:
mode:
Diffstat (limited to 'stylechanger.js')
-rw-r--r--stylechanger.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/stylechanger.js b/stylechanger.js
index b2d06b4..f075ea4 100644
--- a/stylechanger.js
+++ b/stylechanger.js
@@ -43,12 +43,15 @@ liberator.plugins.styleSheetsManger = (function(){
function init() {
if (globalVariables.styles) globalVariables.styles.split(/\s*,\s*/).forEach(manager.load);
}
- function getCSSFiles()
+ function getCSSFiles() {
+ let files = [];
io.getRuntimeDirectories('colors')
.filter(function(colorDir) colorDir)
- .map(function(colorDir)
- io.readDirectory(colorDir).filter(function(file)
- /\.css$/.test(file.leafName.toLowerCase()) && !file.isDirectory()));
+ .forEach(function(colorDir)
+ io.readDirectory(colorDir).forEach(function(file)
+ /\.css$/.test(file.leafName.toLowerCase()) && !file.isDirectory() && files.push(file)));
+ return files;
+ }
function getURIFromName(aName){
var ret = null;
io.getRuntimeDirectories('colors').some(function(file){