Move JavaScript to root lib/ folder
This commit is contained in:
parent
a9c40de393
commit
70aa9b06ee
56 changed files with 0 additions and 0 deletions
13
lib/renderer/chrome-api.js
Normal file
13
lib/renderer/chrome-api.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
});
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue