Skip to content
Browse files

cleanup

  • Loading branch information...
1 parent 68c89ab commit d2d3ec03f2286ba56481c25e546a6076601b815b @pwlin committed May 11, 2012
Showing with 7 additions and 7 deletions.
  1. +1 −1 lib/ananas/mime.js
  2. +6 −6 lib/ananas/utils.js
View
2 lib/ananas/mime.js
@@ -175,10 +175,10 @@ mime = {
'.latex' : ['application/x-latex', icons['font']],
'.less' : ['text/plain', icons['css']],
'.lha' : ['application/octet-stream', icons['compress']],
+ '.log' : ['text/plain', icons['text']],
'.lsf' : ['video/x-la-asf', icons['video']],
'.lsx' : ['video/x-la-asf', icons['video']],
'.lzh' : ['application/octet-stream', icons['compress']],
- '.log' : ['text/plain', icons['text']],
'.m13' : ['application/x-msmediaview', icons['generic']],
'.m14' : ['application/x-msmediaview', icons['generic']],
'.m3u' : ['audio/x-mpegurl', icons['audio']],
View
12 lib/ananas/utils.js
@@ -54,7 +54,7 @@ var utils = {
},
- format_date : function (date, format){
+ format_date : function (date, format) {
// format="YYYY-MM-dd hh:mm:ss"
var o = {
"Y" : date.getFullYear(),
@@ -84,7 +84,7 @@ var utils = {
return format;
},
- format_month_name : function(date_month){
+ format_month_name : function(date_month) {
var date_month_name;
switch(date_month){
case 0:
@@ -131,21 +131,21 @@ var utils = {
},
- url_decode : function(str){
+ url_decode : function(str) {
return decodeURIComponent((str + '').replace(/\+/g, '%20'));
},
- nice_size: function(bytes){
+ nice_size: function(bytes) {
var s = ['bytes', 'kb', 'MB', 'GB', 'TB', 'PB'],
e = Math.floor(Math.log(bytes)/Math.log(1024)),
m = (bytes/Math.pow(1024, Math.floor(e))).toFixed(2),
se = s[e];
if(m.match(/\.00$/)) { m = m.replace(/\.00$/, ''); }
- if (m == 'NaN') { m = '0'; se = 'bytes'; }
+ if (m == 'NaN') { m = '0'; se = 'bytes'; }
return m + ' ' + se ;
},
- trim: function(str){
+ trim: function(str) {
str = str.replace(/^\s\s*/, '');
var ws = /\s/, i = str.length;
while (ws.test(str.charAt(--i)));

0 comments on commit d2d3ec0

Please sign in to comment.
Something went wrong with that request. Please try again.