diff options
author | anekos | 2008-10-01 12:19:01 +0000 |
---|---|---|
committer | anekos | 2008-10-01 12:19:01 +0000 |
commit | c177159192649fa3581f1f292a85426c4a01dc7e (patch) | |
tree | 1354a0e38a7a959dd332be590e48ac1af9b98bfe /stylechanger.js | |
parent | 230c3c245e82be4881f42feea62507cd60992a88 (diff) | |
download | vimperator-plugins-c177159192649fa3581f1f292a85426c4a01dc7e.tar.bz2 |
getCSSFiles の返り血が入れ子になってしまっているのを修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@20388 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'stylechanger.js')
-rw-r--r-- | stylechanger.js | 11 |
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){ |