js: remove suffixes used to indicate days off from issues pages (#68001)

This commit is contained in:
Frédéric Péters 2022-08-06 21:22:25 +02:00
parent d5e8db37a9
commit 10a21d3b8b
1 changed files with 10 additions and 0 deletions

View File

@ -131,6 +131,13 @@ function alter_new_issue_page() {
});
}
function alter_issues_index_page() {
$('td.author a, td.assigned_to a').each(function(idx, elem) {
// remove suffixes used by people to indicate they're off.
$(elem).text($(elem).text().replace(/->.*/, '').replace(/→.*/, '').replace(/\(.*/, '').trim());
});
}
function alter_issue_show_page() {
if ($('.attachments_fields').length) {
var observer = new MutationObserver(function(mutations) {
@ -329,6 +336,9 @@ $(function() {
if ($('body.controller-issues.action-show').length == 1) {
alter_issue_show_page();
}
if ($('body.controller-issues.action-index').length == 1) {
alter_issues_index_page();
}
// custom features, enabled on user request