mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
4d11e257fe
Latest electron allows acces to the url module in a preload script. Also add a wrapper to shield global scope and use strict inside. // FREEBIE
12 lines
279 B
JavaScript
12 lines
279 B
JavaScript
(function () {
|
|
'use strict';
|
|
console.log('preload');
|
|
const electron = require('electron')
|
|
|
|
window.config = require('url').parse(window.location.toString(), true).query;
|
|
|
|
const ipc = electron.ipcRenderer
|
|
window.config.locale_json = ipc.sendSync('locale-data');
|
|
|
|
})();
|