From 50db62f7f569264eb04247bbf190697916d5371a Mon Sep 17 00:00:00 2001 From: blankie Date: Mon, 4 Dec 2023 15:39:48 +1100 Subject: [PATCH] Update Compass QoL Enhancer to 1.24.3 - Prevent clicking on a learning task from changing back to the Dashboard tab --- Compass QoL Enhancer.user.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Compass QoL Enhancer.user.js b/Compass QoL Enhancer.user.js index 751dbe1..9003028 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.24.2 +// @version 1.24.3 // @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 @@ -109,15 +109,18 @@ if (productNavBar) { productNavBar.style.zIndex = 20000; } -// Prevent the dashboard tab in the user page being "dsh" let UserProfileNewWidget = getExtClass("Compass.widgets.UserProfileNewWidget"); if (UserProfileNewWidget) { + // Prevent the dashboard tab in the user page being "dsh" let original = UserProfileNewWidget.prototype.createItems; UserProfileNewWidget.prototype.createItems = function() { let res = original.apply(this, arguments); delete res[0].listeners; return res; }; + + // Prevent clicking on a learning task from changing back to the Dashboard tab + UserProfileNewWidget.prototype.processHashChange = function() {}; } function handleNewsItemClick(event) {