mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 03:32:12 -08:00
Disable eval(), its use is not needed and improves security.
This commit is contained in:
parent
1b38629084
commit
92d8a5e254
@ -13,9 +13,9 @@ document.addEventListener('readystatechange', function(){
|
||||
}
|
||||
}
|
||||
|
||||
if (document.readyState === 'interactive'){
|
||||
/*if (document.readyState === 'interactive'){
|
||||
|
||||
}
|
||||
}*/
|
||||
}, false)
|
||||
|
||||
/* Overlay Wrapper Functions */
|
||||
|
@ -8,6 +8,12 @@
|
||||
const $ = require('jquery');
|
||||
const {remote, shell, webFrame} = require('electron')
|
||||
|
||||
// Disable eval function.
|
||||
// eslint-disable-next-line
|
||||
window.eval = global.eval = function () {
|
||||
throw new Error('Sorry, this app does not support window.eval().')
|
||||
}
|
||||
|
||||
// Disable zoom, needed for darwin.
|
||||
webFrame.setZoomLevel(0)
|
||||
webFrame.setVisualZoomLevelLimits(1, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user