Update Compass QoL Enhancer to 1.11.0
- Revert making strikethroughs more noticable (this should be done in, say, userChrome.css)
This commit is contained in:
		
							parent
							
								
									7483e3e4af
								
							
						
					
					
						commit
						b62b77c652
					
				| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
// @name        Compass QoL Enhancer
 | 
			
		||||
// @namespace   blankie-scripts
 | 
			
		||||
// @match       http*://*.compass.education/*
 | 
			
		||||
// @version     1.10.0
 | 
			
		||||
// @version     1.11.0
 | 
			
		||||
// @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
 | 
			
		||||
| 
						 | 
				
			
			@ -132,7 +132,7 @@ function handleNewCalendarEvent(element, calendar) {
 | 
			
		|||
    // Show the finish time for applicable calendar events
 | 
			
		||||
    let startString = unsafeWindow.Ext.util.Format.date(calendarData.start, unsafeWindow.Compass.TIME_NO_PERIOD_FORMAT);
 | 
			
		||||
    let finishString = unsafeWindow.Ext.util.Format.date(calendarData.finish, unsafeWindow.Compass.TIME_NO_PERIOD_FORMAT);
 | 
			
		||||
    let textElement = a.querySelector("span") || a;
 | 
			
		||||
    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}`) {
 | 
			
		||||
        textElement.innerHTML = `${startString} - ${finishString}: ${calendarData.longTitleWithoutTime}`;
 | 
			
		||||
| 
						 | 
				
			
			@ -328,14 +328,10 @@ document.body.addEventListener("click", function(event) {
 | 
			
		|||
    }
 | 
			
		||||
}, {passive: true});
 | 
			
		||||
 | 
			
		||||
let style = document.createElement("style");
 | 
			
		||||
style.textContent = `
 | 
			
		||||
/* Make strikethroughs more noticeable on calendar events and their tooltips */
 | 
			
		||||
.ext-cal-evt s, .calendar-tip .title s {
 | 
			
		||||
    text-decoration-thickness: .25em;
 | 
			
		||||
// Stop the calendar and email buttons from opening in a new tab
 | 
			
		||||
for (let element of document.querySelectorAll("#productNavBar a[target='_blank']")) {
 | 
			
		||||
    element.removeAttribute("target");
 | 
			
		||||
}
 | 
			
		||||
`;
 | 
			
		||||
document.head.append(style);
 | 
			
		||||
 | 
			
		||||
// Suppress that annoying barebones context menu that only has Copy
 | 
			
		||||
// why is it not obvious that you can just hold ctrl or shift to suppress it???
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,6 @@ A userscript that adds small but useful features for Compass. Features include:
 | 
			
		|||
- Calendar events now being links (they work with [Link Hints] now! you can
 | 
			
		||||
  also ctrl+click on "standard classes", events, and learning tasks)
 | 
			
		||||
- Calendar events now show their end time without having to being hovered
 | 
			
		||||
- Strikethroughs in calendar events are now a lot more noticeable
 | 
			
		||||
- Tabs are now links (you can refresh pages and the tab will automatically
 | 
			
		||||
  open. you can also ctrl+click on them)
 | 
			
		||||
- Files and folders in Resources is now marked clickable ([Link Hints] can now
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue