Created
April 23, 2014 07:57
-
-
Save ohgyun/11206210 to your computer and use it in GitHub Desktop.
트렐로 추정 시간 표시
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var rPoint = /\[([0-9.]+)\]/g; | |
$('.list').each(function (i, list) { | |
var $title = $(list).find('.list-card-title:visible'); | |
var total = 0; | |
$title.each(function (j, title) { | |
var str = $(title).text(); | |
while (rPoint.test(str)) { | |
total += Number(RegExp.$1); | |
} | |
}); | |
total = Math.round(total * 100) / 100; | |
$(list).find('.list-header') | |
.find('._point') | |
.remove() | |
.end() | |
.append('<span class="_point" style="color:red;">[' + total +']</span>'); | |
}); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment