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