Skip to content

Instantly share code, notes, and snippets.

@ohgyun
Created April 23, 2014 07:57
Show Gist options
  • Save ohgyun/11206210 to your computer and use it in GitHub Desktop.
Save ohgyun/11206210 to your computer and use it in GitHub Desktop.
트렐로 추정 시간 표시
(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