From 2bea1df566e1b2b9b0303a1f12d6981dda3bf3b1 Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Mon, 31 Aug 2026 14:58:00 -0400 Subject: [PATCH] Update mousetrap script loading for new framework restrictions Mozilla now restricts the URLs that can be loaded with loadSubScript, so we need to mark this "unsafe" URL as allowed to load. --- CHANGELOG.md | 4 ++++ addon/implementation.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9c0390..562284d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +- 2.4.4: + + - Adjust script loading to work with new restrictions in Thunderbird 153.2. + - 2.4.3: - Increase maximum listed version of Thunderbird for tbkeys-lite to 149 diff --git a/addon/implementation.js b/addon/implementation.js index c3d8ed4..aa7c65a 100644 --- a/addon/implementation.js +++ b/addon/implementation.js @@ -165,9 +165,9 @@ var TBKeys = { }, loadWindowChrome: function (win) { - Services.scriptloader.loadSubScript( + Services.scriptloader.loadSubScriptWithOptions( extension.rootURI.resolve("modules/mousetrap.js"), - win + { target: win, allowUnsafeURL: true } ); win.Mousetrap.prototype.stopCallback = stopCallback; let type = win.document.documentElement.getAttribute("windowtype");