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