Merge branch 'funny-replace' into 'staging'

Funny replace

See merge request PhilippHofer/rot!29
This commit is contained in:
PhilippHofer 2023-09-05 13:59:33 +00:00
commit f846d78b6c
No known key found for this signature in database

View File

@ -5,6 +5,8 @@ document.addEventListener('DOMContentLoaded', function() {
initSearch();
initSidebar();
initToggle();
replaceStrings();
});
function initToggle() {
@ -217,3 +219,10 @@ function initTripSidebar(triggerElement: HTMLElement) {
}
}
}
function replaceStrings() {
const weekdays = document.querySelectorAll('.weekday-js');
Array.prototype.forEach.call(weekdays, (weekday: HTMLElement) => {
weekday.innerHTML = weekday.innerHTML.replace('Freitag', 'Markttag');
});
}