mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-01-09 00:21:10 +00:00
Only attempt to change user agent if it is provided as an argument
This commit is contained in:
parent
5adf7b9297
commit
53383ebae7
@ -16,9 +16,11 @@ ipc.on('params', function(event, message) {
|
||||
webView.setAttribute('minwidth', '100');
|
||||
webView.setAttribute('minheight', '100');
|
||||
|
||||
webView.addEventListener('did-start-loading', function() {
|
||||
webView.setUserAgent(appArgs.userAgent);
|
||||
});
|
||||
if (appArgs.userAgent) {
|
||||
webView.addEventListener('did-start-loading', function() {
|
||||
webView.setUserAgent(appArgs.userAgent);
|
||||
});
|
||||
}
|
||||
|
||||
webView.addEventListener('new-window', function(e) {
|
||||
require('shell').openExternal(e.url);
|
||||
|
Loading…
Reference in New Issue
Block a user