use window.location instead of location
This commit is contained in:
parent
6425ef4261
commit
47a61e9f27
3 changed files with 5 additions and 5 deletions
|
@ -4,9 +4,9 @@ const chrome = window.chrome = window.chrome || {}
|
|||
chrome.extension = {
|
||||
getURL: function (path) {
|
||||
return url.format({
|
||||
protocol: location.protocol,
|
||||
protocol: window.location.protocol,
|
||||
slashes: true,
|
||||
hostname: location.hostname,
|
||||
hostname: window.location.hostname,
|
||||
pathname: path
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue