mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 13:40:47 +00:00
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');
|
|
|
|
})();
|