diff options
author | drry | 2008-04-07 15:28:49 +0000 |
---|---|---|
committer | drry | 2008-04-07 15:28:49 +0000 |
commit | a89408ab2c1ba4b491b93b2092b6f438c2864b1c (patch) | |
tree | 5548388bf7523bcfc4edebb4bd27c5dcde71a850 /stylechanger.js | |
parent | 0d4c33c8f506ae083fa8e97b64bbfa982778024a (diff) | |
download | vimperator-plugins-a89408ab2c1ba4b491b93b2092b6f438c2864b1c.tar.bz2 |
lang/javascript/vimperator-plugins/trunk/stylechanger.js:
* 正規表現を修正しました。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@9101 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'stylechanger.js')
-rw-r--r-- | stylechanger.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stylechanger.js b/stylechanger.js index 71d7b38..0a60ec6 100644 --- a/stylechanger.js +++ b/stylechanger.js @@ -30,11 +30,11 @@ commands.addUserCommand(['hi[ghlight]'], 'basic style changer', function(arg){ - if (!arg || arg == 'on') { + if (!arg || arg == 'on'){ setStyleDisabled(false); } else if (arg == 'clear' || arg == 'off'){ setStyleDisabled(true); - } else if ((getStylesheetList()).indexOf(arg) != -1) { + } else if ((getStylesheetList()).indexOf(arg) != -1){ stylesheetSwitchAll(window.content, arg); setStyleDisabled(false); } @@ -46,7 +46,7 @@ commands.addUserCommand(['hi[ghlight]'], ['off','disable stylesheet'] ]; var styles = list.concat( getStylesheetList().map( - function(elm){ return [elm,'alternative style']; } + function(elm){ return [elm,'alternative style']; } )); if (!aFilter) return [0,styles]; var candidates = styles.filter(function(elm){return elm[0].indexOf(aFilter) == 0;}); @@ -81,7 +81,7 @@ liberator.plugins['styleSheetsManger@teramako.jp'] = (function(){ var cssFiles = []; if (colorDir){ cssFiles = io.readDirectory(colorDir).filter(function(file){ - return /\.css$/.test(file.leafName) && !file.isDirectory() ; + return /\.css$/.test(file.leafName.toLowerCase()) && !file.isDirectory() ; }); } return cssFiles; @@ -123,7 +123,7 @@ 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$/,'');}); + var files = getCSSFiles().map(function(file){return file.leafName.replace(/\.css$/i,'');}); files.forEach(function(file,i){ var buf = ' ' + (i+1) + ' '; if (sss.sheetRegistered(getURIFromName(file), sss.USER_SHEET)){ @@ -138,7 +138,7 @@ liberator.plugins['styleSheetsManger@teramako.jp'] = (function(){ }; commands.addUserCommand(['colo[rschema]'], 'set user stylesheet', function(arg, special){ - if (!arg) { + if (!arg){ manager.list(); return; } @@ -150,7 +150,7 @@ liberator.plugins['styleSheetsManger@teramako.jp'] = (function(){ },{ completer: function(filter, special){ var list = getCSSFiles().map(function(file){ - var name = file.leafName.replace(/\.css$/,''); + var name = file.leafName.replace(/\.css$/i,''); return [name,sss.sheetRegistered(getURIFromName(name),sss.USER_SHEET) ? '*' : '']; }); if (!filter) return [0,list]; @@ -170,4 +170,4 @@ liberator.plugins['styleSheetsManger@teramako.jp'] = (function(){ })(); -// vim: set sw=4 ts=4 sts=0 fdm=marker: +// vim: sw=4 ts=4 sts=0 fdm=marker: |