Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 867 Bytes

File metadata and controls

58 lines (41 loc) · 867 Bytes

Add a progress value to the issue list

Add a progress value to the issue list.
チケット一覧に進捗の値を追加します。

Setting

Path Pattern

/issues$

Insert Position

Head of all pages

Code

JavaScript

$(function() {
  $('table.progress').each(function() {
    const target = $(this);

    // Get the value of progress from class name
    // (ex. progress-10)
    const match = target.attr('class').match(/progress-([0-9]+)/);
    if (!match) {
      return;
    }

    var value = match[1];
    target.after($('<span>').text(value));
  });
});

Result

Before

before

After

after