Shorten event titles, 'Berlin' is kind of redundant
This commit is contained in:
parent
5a4bdd3a81
commit
b1b8448206
1 changed files with 6 additions and 1 deletions
|
@ -68,6 +68,11 @@ function renderEvent(event, container) {
|
|||
}
|
||||
return val;
|
||||
};
|
||||
const cleanTitle = (title) => {
|
||||
let cleaned = title.replace(/\sBerlin$/, '');
|
||||
cleaned = cleaned.replace(/\sUser Group/, ' UG');
|
||||
return cleaned;
|
||||
};
|
||||
const timeFormat = 'HH:MM';
|
||||
if (event.allDay) {
|
||||
time.innerHTML = '--:--';
|
||||
|
@ -76,7 +81,7 @@ function renderEvent(event, container) {
|
|||
}
|
||||
|
||||
code.innerHTML = `C${pad(event.id)}`;
|
||||
destination.innerHTML = event.title;
|
||||
destination.innerHTML = cleanTitle(event.title);
|
||||
|
||||
if (startDate.toDateString() !== prevDate.toDateString()) {
|
||||
status.innerHTML = dateformat(startDate, 'dd.mm.');
|
||||
|
|
Loading…
Reference in a new issue