electron/lib/renderer/chrome-api.js
2016-03-30 17:00:31 -07:00

13 lines
277 B
JavaScript

const url = require('url')
const chrome = window.chrome = window.chrome || {}
chrome.extension = {
getURL: function (path) {
return url.format({
protocol: location.protocol,
slashes: true,
hostname: location.hostname,
pathname: path
})
}
}