13 lines
280 B
JavaScript
13 lines
280 B
JavaScript
const url = require('url');
|
|
const chrome = window.chrome = window.chrome || {};
|
|
|
|
chrome.extension = {
|
|
getURL: function(path) {
|
|
return url.format({
|
|
protocol: location.protocol,
|
|
slashes: true,
|
|
hostname: location.hostname,
|
|
pathname: path
|
|
});
|
|
}
|
|
};
|