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
11 lines
279 B
JavaScript
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');
|
|
|
|
})();
|