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:
parent
4f32e63ece
commit
e14623ba5d
|
@ -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.24.4
|
// @version 1.24.5
|
||||||
// @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
|
||||||
|
@ -676,6 +676,11 @@ function getLearningTaskTab(panel) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
window.addEventListener("hashchange", function(event) {
|
window.addEventListener("hashchange", function(event) {
|
||||||
|
// workaround window.onhashchange being ignored by window.addEventListener("hashchange", ...)
|
||||||
|
if (window.onhashchange) {
|
||||||
|
window.onhashchange();
|
||||||
|
}
|
||||||
|
|
||||||
modifyUrlHash = false;
|
modifyUrlHash = false;
|
||||||
let isActivityPage = window.location.pathname === "/Organise/Activities/Activity.aspx";
|
let isActivityPage = window.location.pathname === "/Organise/Activities/Activity.aspx";
|
||||||
let hashSearch = getHashSearch();
|
let hashSearch = getHashSearch();
|
||||||
|
|
Loading…
Reference in New Issue