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) {