GitHub user breautek added a comment to the discussion: How to conditionally load cordova on remote pages
> So, that is a long way to ask, what is the best way to gain access to cordova > from a remote page, that also doesn't break non-cordova clients? (IE, using > regular web browser shouldn't try to load cordova.js) I'd probably use the config to append a user agent via `AppendUserAgent` preference to your webview. In your web app, you can check the user agent for your string to determine if you're in a cordova app. Then you should be able to load in the `cordova.js` file that would be embedded in the app. I know you stated that you're not uploading to the google play store or the iOS app store, and thus don't care about the terms of service issues, but do understand that this is still exposing a vulnerability. If you have any embedded JS code, including code inside iframes and/or third-party code, it can gain access to the cordova environment and APIs. APIs will be mostly restricted to the plugins you have installed, but it can gain access to much more than what it is intended. GitHub link: https://github.com/apache/cordova/discussions/427#discussioncomment-6763547 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
