From 437132bf25525dd786bb5da1d1d934a6ef050949 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 23 Jul 2019 13:54:49 -0300 Subject: [PATCH] Replace deprecated Chrome API (#6895) The function `chrome.extension.getURL` has been deprecated since Chrome 58 [1]. It is completely equivalent to `chrome.runtime.getURL`, which has been around since Chrome 31. [1]: https://developer.chrome.com/extensions/extension#method-getURL --- app/scripts/contentscript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 0c55ae39f..db4d5fd63 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -10,7 +10,7 @@ const extension = require('extensionizer') const PortStream = require('extension-port-stream') const inpageContent = fs.readFileSync(path.join(__dirname, '..', '..', 'dist', 'chrome', 'inpage.js')).toString() -const inpageSuffix = '//# sourceURL=' + extension.extension.getURL('inpage.js') + '\n' +const inpageSuffix = '//# sourceURL=' + extension.runtime.getURL('inpage.js') + '\n' const inpageBundle = inpageContent + inpageSuffix // Eventually this streaming injection could be replaced with: