diff --git a/Compass QoL Enhancer.user.js b/Compass QoL Enhancer.user.js index 2f12904..ae5b0ca 100644 --- a/Compass QoL Enhancer.user.js +++ b/Compass QoL Enhancer.user.js @@ -2,7 +2,7 @@ // @name Compass QoL Enhancer // @namespace blankie-scripts // @match http*://*.compass.education/* -// @version 1.11.0 +// @version 1.12.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 @@ -325,6 +325,13 @@ document.body.addEventListener("click", function(event) { } else if (event.target.classList.contains("x-form-file-btn")) { // Make Link Hints work with uploading files event.target.querySelector("input[type=file]").click(); + } else if (event.target.closest(".newsfeed-newsItem") && !event.target.closest("a")) { + // Expand news feed items by clicking on them + // the check is to prevent expending by clicking on a link (say, to a file) + let seeMore = event.target.closest(".newsfeed-newsItem").querySelector(".newsfeed-newsItem-seeMoreCTA a"); + if (seeMore) { + seeMore.click(); + } } }, {passive: true}); diff --git a/README.md b/README.md index e3d29dd..e9e829c 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ A userscript that adds small but useful features for Compass. Features include: everything else - The previous/next buttons and sessions dropdown are now links (you can now use [Link Hints] and ctrl-click to open them) +- News feed items can now be opened by simply clicking on their background - The context menu that only says "Copy" is now suppressed - The option to remember logins is unchecked by default