diff --git a/lib/extension.js b/lib/extension.js index b023bd4..8e74a4d 100644 --- a/lib/extension.js +++ b/lib/extension.js @@ -13,6 +13,7 @@ } const browserAvailable = typeof browser !== "undefined"; + const logging = require("./logging"); scope.inBackgroundScript = !!( browserAvailable && @@ -60,6 +61,13 @@ defineAs: name }; const oldDescriptor = Object.getOwnPropertyDescriptor(wrappedContext, name); + if (oldDescriptor && !oldDescriptor.configurable){ + logging.error( + "Unable to export function with the correct name", name, + "instead we have to use", exportedTry.name + ); + return exportedTry; + } const exported = exportFunction(func, context, options); if (oldDescriptor){ Object.defineProperty(wrappedContext, name, oldDescriptor); diff --git a/versions/updates.json b/versions/updates.json index c749f20..5a40be0 100644 --- a/versions/updates.json +++ b/versions/updates.json @@ -101,6 +101,10 @@ { "version": "1.1Alpha20191801", "update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.1Alpha20191801-an+fx.xpi" + }, + { + "version": "1.1Alpha20191901", + "update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.1Alpha20191901-an+fx.xpi" } ] }