Update Compass QoL Enhancer to 1.26.0
- Add refresh button to learning tasks
This commit is contained in:
parent
4aec87e0eb
commit
25e4f6e593
|
@ -2,7 +2,7 @@
|
||||||
// @name Compass QoL Enhancer
|
// @name Compass QoL Enhancer
|
||||||
// @namespace blankie-scripts
|
// @namespace blankie-scripts
|
||||||
// @match http*://*.compass.education/*
|
// @match http*://*.compass.education/*
|
||||||
// @version 1.25.0
|
// @version 1.26.0
|
||||||
// @author blankie
|
// @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
|
// @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
|
// @inject-into page
|
||||||
|
@ -203,6 +203,21 @@ if (LearningTasksDetailsWidgetNew) {
|
||||||
|
|
||||||
return taskGrid;
|
return taskGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add refresh button to learning tasks
|
||||||
|
let originalInitTBar = LearningTasksDetailsWidgetNew.prototype.initTBar;
|
||||||
|
LearningTasksDetailsWidgetNew.prototype.initTBar = function() {
|
||||||
|
originalInitTBar.apply(this, arguments);
|
||||||
|
let widget = this;
|
||||||
|
let refreshButton = {
|
||||||
|
itemId: "refreshButton",
|
||||||
|
text: "Refresh",
|
||||||
|
handler: function() {
|
||||||
|
widget.taskStore.load();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.tbar.splice(this.tbar.indexOf("->") + 1, 0, refreshButton);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automatically add (and remove) the currently open learning task to the URL
|
// Automatically add (and remove) the currently open learning task to the URL
|
||||||
|
|
|
@ -50,6 +50,7 @@ A userscript that adds small but useful features for Compass. Features are:
|
||||||
- Learning tasks now being links (you can ctrl-click them)
|
- Learning tasks now being links (you can ctrl-click them)
|
||||||
- Opening a learning task will automatically add its ID to the URL
|
- Opening a learning task will automatically add its ID to the URL
|
||||||
- Learning tasks' grades and general visibility are now shown
|
- Learning tasks' grades and general visibility are now shown
|
||||||
|
- Add refresh button to learning tasks view
|
||||||
- The previous/next buttons and sessions dropdown are now links (you can now
|
- The previous/next buttons and sessions dropdown are now links (you can now
|
||||||
use [Link Hints] and ctrl-click to open them)
|
use [Link Hints] and ctrl-click to open them)
|
||||||
- Class and news feed items can now be opened by simply clicking on their
|
- Class and news feed items can now be opened by simply clicking on their
|
||||||
|
|
Loading…
Reference in New Issue