diff options
Diffstat (limited to 'main_background.js')
-rw-r--r-- | main_background.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/main_background.js b/main_background.js index cdc987e..5c2e8df 100644 --- a/main_background.js +++ b/main_background.js @@ -1175,6 +1175,21 @@ async function init_addon() { ResponseProcessor.install(ResponseHandler); legacy_license_lib.init(); + + + let Test = require("./common/Test"); + if (Test.getURL()) { + // export testable functions to the global scope + this.LibreJS = { + editHtml, + handle_script, + ExternalLicenses, + }; + // create or focus the autotest tab if it's a debugging session + if ((await browser.management.getSelf()).installType === "development") { + Test.getTab(true); + } + } } |