Rename window.env to window.config
Also normalize to camelCase for configs. // FREEBIE
This commit is contained in:
parent
75f4c3c522
commit
c83dbc1bf0
8 changed files with 12 additions and 12 deletions
|
@ -5,11 +5,11 @@
|
|||
|
||||
console.log('preload');
|
||||
|
||||
window.env = {};
|
||||
window.config = {};
|
||||
window.location.search.substring(1).split('&').forEach(function(variable) {
|
||||
var pair = variable.split('=');
|
||||
env[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
|
||||
config[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
|
||||
});
|
||||
|
||||
const ipc = require('electron').ipcRenderer
|
||||
window.env.locale_json = ipc.sendSync('locale-data');
|
||||
window.config.locale_json = ipc.sendSync('locale-data');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue