applicationize
applicationize copied to clipboard
Support for sites that open links in `about:blank` popups
Some sites open links in a new popup to about:blank and then issues a JavaScript / <meta> redirect, as described here:
http://stackoverflow.com/a/18452171/1123355
These links currently simply open a blank window without loading anything.
If such a website is wrapped in a
webview, everything becomes more difficult:e.targetUrlin the 'newwindow' handler above will contain "about:blank", so without modification the code will open a blank window/tab. To intercept the subsequent redirect from the guest, the app will also have to use the chrome.webRequest API (the documentation appears to be for extensions only, but the API is already available for packaged apps in the stable channel, too)
The code for detecting this is pretty ugly and would require us to start requesting the webRequest permission to install the extension, something that might seem fishy to some users. The ideal solution would not require eavesdropping on users' web requests.
In any case, most pop-up links will work as expected now.
I believe #25 (hosted app migration) will resolve this but it is pending Chrome Dev to implement.
Possible workaround: https://github.com/eladnava/applicationize/issues/25#issuecomment-250857260