mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
16 lines
420 B
JavaScript
16 lines
420 B
JavaScript
/*
|
|
* Pending electron 1.6.x
|
|
* const env = require('url').parse(window.location, true).query;
|
|
*/
|
|
|
|
console.log('preload');
|
|
|
|
window.env = {};
|
|
window.location.search.substring(1).split('&').forEach(function(variable) {
|
|
var pair = variable.split('=');
|
|
env[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
|
|
});
|
|
|
|
const ipc = require('electron').ipcRenderer
|
|
window.env.locale_json = ipc.sendSync('locale-data');
|