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

13 lines
291 B
JavaScript

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