1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

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
This commit is contained in:
Mark Stacey 2019-07-23 13:54:49 -03:00 committed by GitHub
parent aea54d1b86
commit 437132bf25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ const extension = require('extensionizer')
const PortStream = require('extension-port-stream') const PortStream = require('extension-port-stream')
const inpageContent = fs.readFileSync(path.join(__dirname, '..', '..', 'dist', 'chrome', 'inpage.js')).toString() 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 const inpageBundle = inpageContent + inpageSuffix
// Eventually this streaming injection could be replaced with: // Eventually this streaming injection could be replaced with: