aboutsummaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorhackademix <giorgio@maone.net>2018-09-01 08:31:51 +0200
committerhackademix <giorgio@maone.net>2018-09-01 08:31:51 +0200
commitf6bf59a4ed44ec7323a76b11317f715c929a69b4 (patch)
treeadc49b2f1cd64d2a187d9b964bf29015ca8d6729 /content
parentb724b4154b248b65fa93180b24d59e6c80b96d3b (diff)
Moved external licenses check into response pre-processing, in order to avoid filterResponse() as much as possible (fixing issue #11)
Diffstat (limited to 'content')
-rw-r--r--content/externalLicenseChecker.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/content/externalLicenseChecker.js b/content/externalLicenseChecker.js
index 89f871f..f150cea 100644
--- a/content/externalLicenseChecker.js
+++ b/content/externalLicenseChecker.js
@@ -79,9 +79,13 @@
}
browser.runtime.onMessage.addListener(async m => {
- if (m.action in handlers) {
+ if (m.action in handlers) try {
debug("Received message", m);
- return await handlers[m.action](m);
+ let result = await handlers[m.action](m);
+ console.debug("Returning", result);
+ return result;
+ } catch (e) {
+ console.error(e);
}
});
}