diff options
author | drry | 2008-04-05 00:36:28 +0000 |
---|---|---|
committer | drry | 2008-04-05 00:36:28 +0000 |
commit | da376c713c0b0798bbfc2ee781421715f382a441 (patch) | |
tree | 2b6a1d923792b7b1d95e7dc70b1213fcb20e6507 /stylechanger.js | |
parent | 04247e04cd06dffe9c892d322c112b9c8976f358 (diff) | |
download | vimperator-plugins-da376c713c0b0798bbfc2ee781421715f382a441.tar.bz2 |
lang/javascript/vimperator-plugins/trunk/stylechanger.js:
* fixed a missing `,`.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@8900 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'stylechanger.js')
-rw-r--r-- | stylechanger.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stylechanger.js b/stylechanger.js index 37d82a9..64f033c 100644 --- a/stylechanger.js +++ b/stylechanger.js @@ -4,7 +4,7 @@ * @license MPL 1.1/GPL 2.0/LGPL 2.1 * * Usage: - * + * * :hi[ghlight] -> enable stylesheet * :hi[ghlight] [on|clear|off] -> enbale/disable stylesheet * :hi[ghlight] {alt style name} -> switch to the alternative stylesheet @@ -17,7 +17,7 @@ * CSS-file are put in "~/vimperator/colors" directory * * `colors[chema]' command is similar to Stylish - * + * * Example: * * auto load settings @@ -41,15 +41,15 @@ commands.addUserCommand(['hi[ghlight]'], completer: function(aFilter){ var list = [ ['on','enable stylesheet'], - ['clear','disable stylesheet'] - ['off','disable stylesheet'], + ['clear','disable stylesheet'], + ['off','disable stylesheet'] ]; var styles = list.concat( getStylesheetList().filter( function(elm){ return [elm,'alternative style']; } )); if (!aFilter) return [0,styles]; var candidates = styles.filter(function(elm){return elm[0].indexOf(aFilter) == 0;}); - return [ 0, candidates]; + return [0, candidates]; } } ); @@ -89,7 +89,7 @@ liberator.plugins['styleSheetsManger@teramako.jp'] = (function(){ var file = io.getSpecialDirectory('colors'); file.append(aName + '.css'); if (file.exists()) return ios.newFileURI(file); - + return null; } var manager = { @@ -123,15 +123,15 @@ liberator.plugins['styleSheetsManger@teramako.jp'] = (function(){ list: function(){ var str = ['<span class="hl-Title">User StyleSheet List</span>']; var files = getCSSFiles().map(function(file){return file.leafName.replace(/\.css$/,'');}); - for (var i=0; i<files.length; i++){ + files.forEach(function(file,i){ var buf = ' ' + (i+1) + ' '; - if (sss.sheetRegistered(getURIFromName(files[i]), sss.USER_SHEET)){ + if (sss.sheetRegistered(getURIFromName(file), sss.USER_SHEET)){ buf += '<span style="color:blue">*</span>'; } else { buf += ' '; } - str.push(buf +' ' + files[i]); - } + str.push(buf +' ' + file); + }); echo( str.join('\n'), true); } }; |