electron/lib/renderer/chrome-api.js

14 lines
280 B
JavaScript
Raw Normal View History

2016-01-14 22:11:50 +00:00
const url = require('url');
const chrome = window.chrome = window.chrome || {};
2016-01-12 02:40:23 +00:00
chrome.extension = {
getURL: function(path) {
return url.format({
protocol: location.protocol,
slashes: true,
hostname: location.hostname,
pathname: path
});
}
};