Update Compass QoL Enhancer to 1.18.1
- Fix news feed items from being expanded when attachments are clicked
This commit is contained in:
parent
35268b251f
commit
470e175c0d
|
@ -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.18.0
|
// @version 1.18.1
|
||||||
// @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
|
||||||
|
@ -71,8 +71,8 @@ if (UserProfileNewWidget) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleNewsItemClick() {
|
function handleNewsItemClick(event) {
|
||||||
if (!this.moreButton.hidden) {
|
if (!this.moreButton.hidden && event.target.localName !== "a") {
|
||||||
Compass.saveScrollPosition();
|
Compass.saveScrollPosition();
|
||||||
this.expandTruncated();
|
this.expandTruncated();
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ if (NewsfeedItemWidget) {
|
||||||
this.newsItemTextContainer.events.afterrender = true;
|
this.newsItemTextContainer.events.afterrender = true;
|
||||||
// Expand news feed items by clicking on them
|
// Expand news feed items by clicking on them
|
||||||
this.on("afterrender", function() {
|
this.on("afterrender", function() {
|
||||||
this.el.on("click", handleNewsItemClick.bind(this), this.el, {single: true});
|
this.el.on("click", handleNewsItemClick.bind(this), this.el);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue