Update Compass QoL Enhancer to 1.24.4.
- Fix showing finish time for calendar events with an ampersand
This commit is contained in:
parent
50db62f7f5
commit
13bffe0d7f
|
@ -2,7 +2,7 @@
|
|||
// @name Compass QoL Enhancer
|
||||
// @namespace blankie-scripts
|
||||
// @match http*://*.compass.education/*
|
||||
// @version 1.24.3
|
||||
// @version 1.24.4
|
||||
// @author blankie
|
||||
// @description A userscript that adds small but useful features for Compass, such as the ability to close windows by clicking on the background
|
||||
// @inject-into page
|
||||
|
@ -415,7 +415,7 @@ function handleNewCalendarEvent(element, calendar) {
|
|||
let finishString = unsafeWindow.Ext.util.Format.date(calendarData.finish, unsafeWindow.Compass.TIME_NO_PERIOD_FORMAT);
|
||||
let textElement = a.querySelector(".ext-evt-bd") || a;
|
||||
// yes, innerHTML. longTitleWithoutTime can apparently contain HTML. lets hope that startString and finishString don't
|
||||
if (textElement.innerHTML === `${startString}: ${calendarData.longTitleWithoutTime}`) {
|
||||
if (textElement.innerHTML.startsWith(`${startString}: `)) {
|
||||
textElement.innerHTML = `${startString} - ${finishString}: ${calendarData.longTitleWithoutTime}`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue