2016-03-25 12:57:17 -07:00
|
|
|
const url = require('url')
|
|
|
|
const chrome = window.chrome = window.chrome || {}
|
2016-01-11 18:40:23 -08:00
|
|
|
|
|
|
|
chrome.extension = {
|
2016-03-25 12:57:17 -07:00
|
|
|
getURL: function (path) {
|
2016-01-11 18:40:23 -08:00
|
|
|
return url.format({
|
2016-03-30 14:07:27 -07:00
|
|
|
protocol: window.location.protocol,
|
2016-01-11 18:40:23 -08:00
|
|
|
slashes: true,
|
2016-03-30 14:07:27 -07:00
|
|
|
hostname: window.location.hostname,
|
2016-01-11 18:40:23 -08:00
|
|
|
pathname: path
|
2016-03-25 12:57:17 -07:00
|
|
|
})
|
2016-01-11 18:40:23 -08:00
|
|
|
}
|
2016-03-25 12:57:17 -07:00
|
|
|
}
|