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({
|
|
|
|
protocol: location.protocol,
|
|
|
|
slashes: true,
|
|
|
|
hostname: location.hostname,
|
|
|
|
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
|
|
|
}
|