Improved tooltips

This commit is contained in:
2018-04-18 16:27:08 +02:00
parent 976563ed60
commit 334be053fe
9 changed files with 46 additions and 39 deletions

View File

@ -123,8 +123,14 @@ export function displayDate(element: HTMLElement, now: Date) {
}
element.innerText = remainingString
let tooltip = dayNames[startDate.getDay()] + " " + startTime
element.title = dayNames[startDate.getDay()] + " " + startTime
if(element.classList.contains("no-tip")) {
element.title = tooltip
} else {
element.setAttribute("aria-label", tooltip)
element.classList.add("tip")
}
}
export function displayTime(element: HTMLElement, now: Date) {