Update Compass QoL Enhancer to 1.9.0
- Ctrl-clicking an activity in a user's learning tasks tab no longer collapses everything else
This commit is contained in:
parent
86e3646fa2
commit
4f5bc106b7
|
@ -2,7 +2,7 @@
|
|||
// @name Compass QoL Enhancer
|
||||
// @namespace blankie-scripts
|
||||
// @match http*://*.compass.education/*
|
||||
// @version 1.8.1
|
||||
// @version 1.9.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
|
||||
|
@ -150,6 +150,15 @@ function handlePanelItem(panel, panelItem, isDefault, tabToOpen) {
|
|||
});
|
||||
}
|
||||
|
||||
function handleLearningTasksTable(element) {
|
||||
// Make ctrl-clicking activities in a user's learning tasks tab no longer collapse everything else
|
||||
for (let a of element.querySelectorAll(".x-grid-group-title a")) {
|
||||
a.addEventListener("click", function(event) {
|
||||
event.stopImmediatePropagation();
|
||||
}, {passive: true});
|
||||
}
|
||||
}
|
||||
|
||||
function handleCKEditor(instance) {
|
||||
instance.on("contentDom", function() {
|
||||
let editable = instance.editable();
|
||||
|
@ -199,6 +208,8 @@ function handleNewNode(node, observer) {
|
|||
for (let element of node.querySelectorAll("td, .x-tree-expander")) {
|
||||
element.setAttribute("role", "button");
|
||||
}
|
||||
} else if (node.localName === "table" && node.closest(".sel-learning-tasks-widget")) {
|
||||
handleLearningTasksTable(node);
|
||||
} else if (node.classList.contains("cke")) {
|
||||
let instance = unsafeWindow.CKEDITOR.instances[node.id.substring(4)];
|
||||
handleCKEditor(instance);
|
||||
|
|
|
@ -31,6 +31,8 @@ A userscript that adds small but useful features for Compass. Features include:
|
|||
- File upload buttons now work with [Link Hints]
|
||||
- Links inside lesson plans now open in the parent tab by default instead of
|
||||
creating a new tab
|
||||
- Ctrl-clicking an activity in a user's learning tasks tab no longer collapses
|
||||
everything else
|
||||
- The context menu that only says "Copy" is now suppressed
|
||||
- The option to remember logins is unchecked by default
|
||||
|
||||
|
|
Loading…
Reference in New Issue