From 35268b251fffcb50107c1c71abdf9ed77cb9741d Mon Sep 17 00:00:00 2001 From: blankie Date: Mon, 9 Oct 2023 14:28:23 +1100 Subject: [PATCH] Update Compass QoL Enhancer to 1.18.0 - Make links in Looking Ahead actual links --- Compass QoL Enhancer.user.js | 15 ++++++++++++++- README.md | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Compass QoL Enhancer.user.js b/Compass QoL Enhancer.user.js index fd6e369..4b958d2 100644 --- a/Compass QoL Enhancer.user.js +++ b/Compass QoL Enhancer.user.js @@ -2,7 +2,7 @@ // @name Compass QoL Enhancer // @namespace blankie-scripts // @match http*://*.compass.education/* -// @version 1.17.2 +// @version 1.18.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 @@ -91,6 +91,19 @@ if (NewsfeedItemWidget) { } } +// Make links in Looking Ahead actual links +let NewsfeedAlertItemWidget = getExtClass("Compass.widgets.NewsfeedAlertItemWidget"); +if (NewsfeedAlertItemWidget) { + let original = NewsfeedAlertItemWidget.prototype.initComponent; + NewsfeedAlertItemWidget.prototype.initComponent = function() { + this.alertItem.Content = this.alertItem.Content.replaceAll( + /