Update Compass QoL Enhancer to 1.24.3
- Prevent clicking on a learning task from changing back to the Dashboard tab
This commit is contained in:
parent
ed564db7fa
commit
50db62f7f5
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue