signal-desktop/preload.js
lilia 4d11e257fe
Use built-in url parsing in preload script
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
2017-09-14 16:53:39 -07:00

11 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');
})();