diff --git a/index.html b/index.html
index 220a2ecf07..0c8f7e3bd7 100644
--- a/index.html
+++ b/index.html
@@ -109,8 +109,10 @@
}
diff --git a/js/activity.js b/js/activity.js
index 4c161ff194..6b1cb3e1e1 100644
--- a/js/activity.js
+++ b/js/activity.js
@@ -198,6 +198,7 @@ class Activity {
*/
constructor() {
globalActivity = this;
+ window.globalActivity = this;
this.cellSize = 55;
this.searchSuggestions = [];
@@ -6949,10 +6950,14 @@ class Activity {
const activity = new Activity();
-require(["domReady!"], (doc) =>{
+require(["domReady!"], (doc) => {
setTimeout(() => {
activity.setupDependencies();
activity.domReady(doc);
+
+ // Dispatch a custom event to signal that globalActivity is ready
+ const event = new CustomEvent('globalActivityReady');
+ document.dispatchEvent(event);
}, 5000);
});