Update Compass QoL Enhancer to 1.25.5

- Workaround window.onhashchange being ignored due to the userscript calling
window.addEventListener("hashchange", ...)
This commit is contained in:
blankie 2024-01-31 16:40:34 +11:00
parent 4f32e63ece
commit e14623ba5d
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 6 additions and 1 deletions

View File

@ -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();