From e14623ba5dd6406439a9703f9786c10440488918 Mon Sep 17 00:00:00 2001 From: blankie Date: Wed, 31 Jan 2024 16:40:34 +1100 Subject: [PATCH] Update Compass QoL Enhancer to 1.25.5 - Workaround window.onhashchange being ignored due to the userscript calling window.addEventListener("hashchange", ...) --- Compass QoL Enhancer.user.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Compass QoL Enhancer.user.js b/Compass QoL Enhancer.user.js index 8b1e2ad..d9d49ab 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.24.4 +// @version 1.24.5 // @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 @@ -676,6 +676,11 @@ function getLearningTaskTab(panel) { }); } window.addEventListener("hashchange", function(event) { + // workaround window.onhashchange being ignored by window.addEventListener("hashchange", ...) + if (window.onhashchange) { + window.onhashchange(); + } + modifyUrlHash = false; let isActivityPage = window.location.pathname === "/Organise/Activities/Activity.aspx"; let hashSearch = getHashSearch();