2017-04-04 20:39:24 +00:00
|
|
|
/*
|
|
|
|
* Pending electron 1.6.x
|
|
|
|
* const env = require('url').parse(window.location, true).query;
|
|
|
|
*/
|
|
|
|
|
2017-04-07 19:58:42 +00:00
|
|
|
console.log('preload');
|
|
|
|
|
2017-04-13 17:47:30 +00:00
|
|
|
window.config = {};
|
2017-04-04 20:39:24 +00:00
|
|
|
window.location.search.substring(1).split('&').forEach(function(variable) {
|
|
|
|
var pair = variable.split('=');
|
2017-04-13 17:47:30 +00:00
|
|
|
config[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
|
2017-04-04 20:39:24 +00:00
|
|
|
});
|
2017-04-04 06:32:46 +00:00
|
|
|
|
|
|
|
const ipc = require('electron').ipcRenderer
|
2017-04-13 17:47:30 +00:00
|
|
|
window.config.locale_json = ipc.sendSync('locale-data');
|