electron/atom/renderer/lib/chrome-api.js

17 lines
287 B
JavaScript
Raw Normal View History

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