Update Compass QoL Enhancer to 1.24.1
- Fix error when getting the title of a header-less window - Fix news item expanding when an attached image is opened
This commit is contained in:
parent
c13f837c62
commit
d8b7be45b5
|
@ -2,7 +2,7 @@
|
|||
// @name Compass QoL Enhancer
|
||||
// @namespace blankie-scripts
|
||||
// @match http*://*.compass.education/*
|
||||
// @version 1.24.0
|
||||
// @version 1.24.1
|
||||
// @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
|
||||
|
@ -120,7 +120,7 @@ if (UserProfileNewWidget) {
|
|||
}
|
||||
|
||||
function handleNewsItemClick(event) {
|
||||
if (!this.moreButton.hidden && event.target.localName !== "a") {
|
||||
if (!this.moreButton.hidden && !event.target.closest("a, .newsfeed-image")) {
|
||||
Compass.saveScrollPosition();
|
||||
this.expandTruncated();
|
||||
}
|
||||
|
@ -578,8 +578,12 @@ function handleNewNode(node, observer) {
|
|||
handleLearningTasksTable(node);
|
||||
} else if (node.classList.contains("x-grid-view") && unsafeWindow.Ext.getCmp(node.id).up("#submissionsPanel")) {
|
||||
handleLearningTaskSubmissionTable(node);
|
||||
} else if (node.classList.contains("x-window") && node.querySelector(".x-window-header-text").textContent.startsWith("View Permissions for ")) {
|
||||
handlePermissionsWindow(node);
|
||||
} else if (node.classList.contains("x-window")) {
|
||||
let titleElement = node.querySelector(".x-window-header-text");
|
||||
let title = titleElement ? titleElement.textContent : "";
|
||||
if (title.startsWith("View Permissions for ")) {
|
||||
handlePermissionsWindow(node);
|
||||
}
|
||||
}
|
||||
|
||||
if (node.classList.contains("cke")) {
|
||||
|
|
Loading…
Reference in New Issue