electron/lib/renderer/chrome-api.js
2016-03-08 11:14:21 -08:00

13 lines
280 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
});
}
};