How to force to open all links in same window in nativefier?

Viewed 1337

I am using nativefier (https://github.com/jiahaog/nativefier) with new google sites and Mozilla user agent (to avoid the message that this app is not secure while signing in). The nativefier makes use of electron build and webview as I understand. Is it possible to force to open all links whether internal or external in same window.( I have andriod web view app where all links get opened in same window. This is possible with android webview.)

1 Answers

I was facing the same issue with Google Docs but was able to have all Google links open in the default browser by adding accounts.google.com prefix to the internal urls of nativefier.

One can do that with the --internal-urls flag upon app creation or by editing the internalUrls key of the "resources/app/nativefier.json" file of the app.

For example for Google Docs I have the following JSON entry:

"internalUrls": "(.*?contacts\\.google\\.com.*?|.*?accounts\\.google\\.com.*?|.*?docs\\.google\\.com.*?)"

https://github.com/jiahaog/nativefier-icons/issues/45

Related