summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-09-23 15:45:30 -0400
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-09-23 15:45:30 -0400
commit1d1c2168ff30ac9452b0929db4ae1f5baa83657a (patch)
tree1967e3ca3898bf2f33938e89bd1e6add6e49a570 /plugins
parent26821696678cf84ee19f4eb803807e41a7b56780 (diff)
updates
Diffstat (limited to 'plugins')
-rw-r--r--plugins/android.json39
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/README.md59
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/hooks/after_plugin_install/000-shared_mode_special.js100
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/hooks/before_plugin_uninstall/000-shared_mode_special.js60
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/package.json8
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/plugin.xml40
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaCookieManager.java53
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaResourceClient.java231
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaUiClient.java193
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaView.java108
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/src/android/XWalkExposedJsApi.java52
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/src/android/XWalkWebViewEngine.java174
-rw-r--r--plugins/cordova-plugin-crosswalk-webview/src/android/xwalk.gradle93
-rw-r--r--plugins/cordova-plugin-splashscreen/src/browser/SplashScreenProxy.js2
-rw-r--r--plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.h2
-rw-r--r--plugins/cordova-plugin-splashscreen/src/wp/ResolutionHelper.cs6
-rw-r--r--plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h4
-rw-r--r--plugins/cordova-plugin-splashscreen/tests/ios/package.json4
-rw-r--r--plugins/cordova-plugin-splashscreen/www/windows/SplashScreenProxy.js4
-rw-r--r--plugins/cordova-plugin-whitelist/README.md38
-rw-r--r--plugins/cordova-plugin-whitelist/RELEASENOTES.md8
-rw-r--r--plugins/cordova-plugin-whitelist/doc/de/README.md148
-rw-r--r--plugins/cordova-plugin-whitelist/doc/es/README.md148
-rw-r--r--plugins/cordova-plugin-whitelist/doc/fr/README.md148
-rw-r--r--plugins/cordova-plugin-whitelist/doc/it/README.md148
-rw-r--r--plugins/cordova-plugin-whitelist/doc/ja/README.md148
-rw-r--r--plugins/cordova-plugin-whitelist/doc/ko/README.md148
-rw-r--r--plugins/cordova-plugin-whitelist/doc/pl/README.md148
-rw-r--r--plugins/cordova-plugin-whitelist/doc/zh/README.md148
-rw-r--r--plugins/cordova-plugin-whitelist/package.json4
-rw-r--r--plugins/cordova-plugin-whitelist/plugin.xml19
-rw-r--r--plugins/cordova-plugin-whitelist/src/ios/CDVNavigationWhitelistPlugin.h6
-rw-r--r--plugins/cordova-plugin-whitelist/src/ios/CDVNavigationWhitelistPlugin.m2
-rw-r--r--plugins/fetch.json24
-rw-r--r--plugins/ios.json13
35 files changed, 1544 insertions, 986 deletions
diff --git a/plugins/android.json b/plugins/android.json
index 0b1dc6b5..78c04566 100644
--- a/plugins/android.json
+++ b/plugins/android.json
@@ -17,10 +17,6 @@
"count": 1
},
{
- "xml": "<preference name=\"webView\" value=\"org.crosswalk.engine.XWalkWebViewEngine\" />",
- "count": 1
- },
- {
"xml": "<feature name=\"File\"><param name=\"android-package\" value=\"org.apache.cordova.file.FileUtils\" /><param name=\"onload\" value=\"true\" /></feature>",
"count": 1
},
@@ -63,6 +59,22 @@
{
"xml": "<feature name=\"AppVersion\"><param name=\"android-package\" value=\"uk.co.whiteoctober.cordova.AppVersion\" /></feature>",
"count": 1
+ },
+ {
+ "xml": "<preference name=\"webView\" value=\"org.crosswalk.engine.XWalkWebViewEngine\" />",
+ "count": 1
+ },
+ {
+ "xml": "<preference default=\"14+\" name=\"xwalkVersion\" />",
+ "count": 1
+ },
+ {
+ "xml": "<preference default=\"--disable-pull-to-refresh-effect\" name=\"xwalkCommandLine\" />",
+ "count": 1
+ },
+ {
+ "xml": "<preference default=\"embedded\" name=\"xwalkMode\" />",
+ "count": 1
}
]
}
@@ -73,6 +85,14 @@
{
"xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
"count": 2
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />",
+ "count": 1
+ },
+ {
+ "xml": "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />",
+ "count": 1
}
]
}
@@ -86,9 +106,6 @@
"com.phonegap.plugins.OrientationLock": {
"PACKAGE_NAME": "com.pliablepixels.zmninja"
},
- "cordova-plugin-crosswalk-webview": {
- "PACKAGE_NAME": "com.pliablepixels.zmninja"
- },
"cordova-plugin-file": {
"PACKAGE_NAME": "com.pliablepixels.zmninja"
},
@@ -98,6 +115,9 @@
"cordova-plugin-splashscreen": {
"PACKAGE_NAME": "com.pliablepixels.zmninja"
},
+ "cordova-plugin-touchid": {
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
+ },
"cordova-plugin-whitelist": {
"PACKAGE_NAME": "com.pliablepixels.zmninja"
},
@@ -125,7 +145,10 @@
"uk.co.whiteoctober.cordova.appversion": {
"PACKAGE_NAME": "com.pliablepixels.zmninja"
},
- "cordova-plugin-touchid": {
+ "cordova-plugin-crosswalk-webview": {
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
+ },
+ "cordova-plugin-ios-longpress-fix": {
"PACKAGE_NAME": "com.pliablepixels.zmninja"
}
},
diff --git a/plugins/cordova-plugin-crosswalk-webview/README.md b/plugins/cordova-plugin-crosswalk-webview/README.md
index cb5d8f9a..768990a8 100644
--- a/plugins/cordova-plugin-crosswalk-webview/README.md
+++ b/plugins/cordova-plugin-crosswalk-webview/README.md
@@ -3,11 +3,27 @@
Makes your Cordova application use the [Crosswalk WebView](https://crosswalk-project.org/)
instead of the System WebView. Requires cordova-android 4.0 or greater.
+### Benefits
+
+* WebView doesn't change depending on Android version
+* Capabilities: such as WebRTC, WebAudio, Web Components
+* Performance improvements (compared to older system webviews)
+
+
+### Drawbacks
+
+* Increased memory footprint
+ * An overhead of ~30MB (as reported by the RSS column of ps)
+* Increased APK size (about 17MB)
+* Increased size on disk when installed (about 50MB)
+* Crosswalk WebView stores data (IndexedDB, LocalStorage, etc) separately from System WebView
+ * You'll need to manually migrate local data when switching between the two (note: this is fixed in Crosswalk 15)
+
### Install
The following directions are for cordova-cli (most people). Alternatively you can use the [Android platform scripts workflow](PlatformScriptsWorkflow.md).
-* Open an existing cordova project, with cordova-android 4.0.0+, and using the latest CLI.
+* Open an existing cordova project, with cordova-android 4.0.0+, and using the latest CLI. Crosswalk variables can be configured as an option when installing the plugin
* Add this plugin
```
@@ -35,25 +51,54 @@ To build Crosswalk-enabled apks, add this plugin and run:
To build System-webview apk, remove this plugin and run:
- $ cordova build --release -- --android-minSdkVersion=21
+ $ cordova build --release -- --minSdkVersion=21
### Configure
-You can try out a different Crosswalk version using a `<preference>` tag within your `config.xml`. Some examples:
+You can try out a different Crosswalk version by specifying certain variables while installing the plugin, or by changing the value of `xwalkVersion` in your `config.xml` after installing the plugin. Some examples:
+
+ <!-- These are all equivalent -->
+ cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="org.xwalk:xwalk_core_library:14+"
+ cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="xwalk_core_library:14+"
+ cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="14+"
+ cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="14"
+ <preference name="xwalkVersion" value="org.xwalk:xwalk_core_library:14+" />
+ <preference name="xwalkVersion" value="xwalk_core_library:14+" />
+ <preference name="xwalkVersion" value="14+" />
+ <preference name="xwalkVersion" value="14" />
+
+You can also use a Crosswalk beta version. Some examples:
<!-- These are all equivalent -->
- <preference name="xwalkVersion" value="org.xwalk:xwalk_core_library_beta:13+" />
- <preference name="xwalkVersion" value="xwalk_core_library_beta:13+" />
- <preference name="xwalkVersion" value="13+" />
- <preference name="xwalkVersion" value="13" />
+ cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="org.xwalk:xwalk_core_library_beta:14+"
+ <preference name="xwalkVersion" value="org.xwalk:xwalk_core_library_beta:14+" />
You can set [command-line flags](http://peter.sh/experiments/chromium-command-line-switches/) as well:
<!-- This is the default -->
+ cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_COMMANDLINE="--disable-pull-to-refresh-effect"
<preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" />
+You can use the Crosswalk [shared mode](https://crosswalk-project.org/documentation/shared_mode.html) which allows multiple Crosswalk applications to share one Crosswalk runtime downloaded from the Play Store.
+
+ <!-- These are all equivalent -->
+ cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_MODE="shared"
+ <preference name="xwalkMode" value="shared" />
+Note that if you want to specify the Crosswalk version when using shared mode, you need to use the shared version of the library, e.g.:
+
+ <!-- Using a Crosswalk shared mode beta version -->
+ cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="org.xwalk:xwalk_shared_library_beta:14+"
+
+
### Release Notes
+#### 1.3.0 (August 28, 2015)
+* Crosswalk variables can be configured as an option via CLI
+* Support for [Crosswalk's shared mode](https://crosswalk-project.org/documentation/shared_mode.html) via the XWALK_MODE install variable or xwalkMode preference
+* Uses the latest Crosswalk 14 stable version by default
+* The ANIMATABLE_XWALK_VIEW preference is false by default
+* Doesn't work with Crosswalk 14.43.343.17 and earlier
+
#### 1.2.0 (April 22, 2015)
* Made Crosswalk command-line configurable via `<preference name="xwalkCommandLine" value="..." />`
* Disabled pull-down-to-refresh by default
diff --git a/plugins/cordova-plugin-crosswalk-webview/hooks/after_plugin_install/000-shared_mode_special.js b/plugins/cordova-plugin-crosswalk-webview/hooks/after_plugin_install/000-shared_mode_special.js
new file mode 100644
index 00000000..b0581b02
--- /dev/null
+++ b/plugins/cordova-plugin-crosswalk-webview/hooks/after_plugin_install/000-shared_mode_special.js
@@ -0,0 +1,100 @@
+#!/usr/bin/env node
+
+module.exports = function(context) {
+
+ /** @external */
+ var fs = context.requireCordovaModule('fs'),
+ path = context.requireCordovaModule('path'),
+ deferral = context.requireCordovaModule('q').defer(),
+ ConfigParser = context.requireCordovaModule("cordova-lib/src/configparser/ConfigParser"),
+ XmlHelpers = context.requireCordovaModule("cordova-lib/src/util/xml-helpers"),
+ et = context.requireCordovaModule('elementtree');
+
+ /** @defaults */
+ var xwalkVariables = {'xwalkVersion':'14+', 'xwalkCommandLine':'--disable-pull-to-refresh-effect',
+ 'xwalkMode':'embedded'},
+ argumentsString = context.cmdLine,
+ androidPlatformDir = path.join(context.opts.projectRoot,
+ 'platforms', 'android'),
+ projectConfigurationFile = path.join(context.opts.projectRoot,
+ 'config.xml'),
+ projectManifestFile = path.join(androidPlatformDir,
+ 'AndroidManifest.xml'),
+ platformJsonFile = path.join(context.opts.projectRoot,
+ 'plugins', 'android.json');
+
+ /** Init */
+ var CordovaConfig = new ConfigParser(projectConfigurationFile);
+
+ var addPermission = function() {
+ var projectManifestXmlRoot = XmlHelpers.parseElementtreeSync(projectManifestFile);
+ var child = et.XML('<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />');
+ XmlHelpers.graftXML(projectManifestXmlRoot, [child], '/manifest');
+ fs.writeFileSync(projectManifestFile, projectManifestXmlRoot.write({indent: 4}), 'utf-8');
+ }
+
+ /** Set preference */
+ var addPreferences = function() {
+ var configXmlRoot = XmlHelpers.parseElementtreeSync(projectConfigurationFile);
+ for (name in xwalkVariables) {
+ var child = et.XML('<preference name="' + name + '" value="' + xwalkVariables[name] + '" />');
+ XmlHelpers.graftXML(configXmlRoot, [child], '/*');
+ }
+ fs.writeFileSync(projectConfigurationFile, configXmlRoot.write({indent: 4}), 'utf-8');
+ }
+
+ /** The style of name align with config.xml */
+ var setConfigPreference = function(name, value) {
+ var localName = null;
+ if (name == 'XWALK_VERSION') {
+ localName = 'xwalkVersion';
+ } else if (name == 'XWALK_COMMANDLINE') {
+ localName = 'xwalkCommandLine';
+ } else if (name == 'XWALK_MODE') {
+ localName = 'xwalkMode';
+ }
+
+ if (localName) {
+ xwalkVariables[localName] = value;
+ }
+ }
+
+ /** Pase the cli command to get the specific preferece*/
+ var parseCliPreference = function() {
+ var commandlineVariablesList = argumentsString.split('variable');
+ if (commandlineVariablesList) {
+ commandlineVariablesList.forEach(function(element) {
+ var spaceList = element.split(' ');
+ if (spaceList) {
+ spaceList.forEach(function(element) {
+ var preference = element.split('=');
+ if (preference && preference.length == 2) {
+ setConfigPreference(preference[0].toUpperCase(), preference[1]);
+ }
+ });
+ }
+ });
+ }
+ }
+
+ /** Main method */
+ var main = function() {
+ // Parse cli preference
+ parseCliPreference();
+
+ // Add xwalk preference to config.xml
+ addPreferences();
+
+ if (xwalkVariables['xwalkMode'] == 'shared') {
+ // Add the permission of write_external_storage in shared mode
+ addPermission();
+ }
+
+ deferral.resolve();
+ };
+
+ main();
+
+ return deferral.promise;
+
+};
diff --git a/plugins/cordova-plugin-crosswalk-webview/hooks/before_plugin_uninstall/000-shared_mode_special.js b/plugins/cordova-plugin-crosswalk-webview/hooks/before_plugin_uninstall/000-shared_mode_special.js
new file mode 100644
index 00000000..2cc741d3
--- /dev/null
+++ b/plugins/cordova-plugin-crosswalk-webview/hooks/before_plugin_uninstall/000-shared_mode_special.js
@@ -0,0 +1,60 @@
+#!/usr/bin/env node
+
+module.exports = function(context) {
+
+ /** @external */
+ var fs = context.requireCordovaModule('fs'),
+ path = context.requireCordovaModule('path'),
+ deferral = context.requireCordovaModule('q').defer(),
+ ConfigParser = context.requireCordovaModule("cordova-lib/src/configparser/ConfigParser"),
+ XmlHelpers = context.requireCordovaModule("cordova-lib/src/util/xml-helpers"),
+ et = context.requireCordovaModule('elementtree');
+
+ /** @defaults */
+ var xwalkVariables = ['xwalkVersion', 'xwalkCommandLine', 'xwalkMode'];
+ androidPlatformDir = path.join(context.opts.projectRoot,
+ 'platforms', 'android'),
+ projectConfigurationFile = path.join(context.opts.projectRoot,
+ 'config.xml'),
+ projectManifestFile = path.join(androidPlatformDir,
+ 'AndroidManifest.xml');
+
+ /** Init */
+ var CordovaConfig = new ConfigParser(projectConfigurationFile);
+
+ var removePermission = function() {
+ var projectManifestXmlRoot = XmlHelpers.parseElementtreeSync(projectManifestFile);
+ var child = et.XML('<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />');
+ XmlHelpers.pruneXML(projectManifestXmlRoot, [child], '/manifest');
+ fs.writeFileSync(projectManifestFile, projectManifestXmlRoot.write({indent: 4}), 'utf-8');
+ }
+
+ var removeXWalkVariables = function() {
+ var configXmlRoot = XmlHelpers.parseElementtreeSync(projectConfigurationFile);
+ for (var index = 0; index < xwalkVariables.length; index++) {
+ var child = configXmlRoot.find('./preference[@name="' + xwalkVariables[index] + '"]');
+ if (child) {
+ XmlHelpers.pruneXML(configXmlRoot, [child], '/*');
+ }
+ }
+ fs.writeFileSync(projectConfigurationFile, configXmlRoot.write({indent: 4}), 'utf-8');
+ }
+
+ /** Main method */
+ var main = function() {
+ // Remove the xwalk variables
+ removeXWalkVariables();
+
+ if (CordovaConfig.getGlobalPreference('xwalkMode') == 'shared') {
+ // Add the permission of write_external_storage in shared mode
+ removePermission();
+ }
+
+ deferral.resolve();
+ };
+
+ main();
+
+ return deferral.promise;
+
+};
diff --git a/plugins/cordova-plugin-crosswalk-webview/package.json b/plugins/cordova-plugin-crosswalk-webview/package.json
index 0ad32912..c4c95f1f 100644
--- a/plugins/cordova-plugin-crosswalk-webview/package.json
+++ b/plugins/cordova-plugin-crosswalk-webview/package.json
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-crosswalk-webview",
- "version": "1.2.0",
+ "version": "1.3.1",
"description": "Changes the default WebView to CrossWalk",
"cordova": {
"id": "cordova-plugin-crosswalk-webview",
@@ -10,7 +10,7 @@
},
"repository": {
"type": "git",
- "url": "https://github.com/MobileChromeApps/cordova-crosswalk-engine.git"
+ "url": "https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview.git"
},
"keywords": [
"cordova",
@@ -34,7 +34,7 @@
"author": "",
"license": "Apache 2.0",
"bugs": {
- "url": "https://github.com/MobileChromeApps/cordova-crosswalk-engine/issues"
+ "url": "https://crosswalk-project.org/jira"
},
- "homepage": "https://github.com/MobileChromeApps/cordova-crosswalk-engine"
+ "homepage": "https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview"
}
diff --git a/plugins/cordova-plugin-crosswalk-webview/plugin.xml b/plugins/cordova-plugin-crosswalk-webview/plugin.xml
index ac5aac07..95f35dc8 100644
--- a/plugins/cordova-plugin-crosswalk-webview/plugin.xml
+++ b/plugins/cordova-plugin-crosswalk-webview/plugin.xml
@@ -1,33 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
- id="cordova-plugin-crosswalk-webview"
- version="1.2.0">
+ id="cordova-plugin-crosswalk-webview"
+ version="1.3.1">
<name>Crosswalk WebView Engine</name>
<description>Changes the default WebView to CrossWalk</description>
<license>Apache 2.0</license>
<keywords>cordova,chromium,crosswalk,webview</keywords>
- <repo>https://github.com/MobileChromeApps/cordova-crosswalk-engine.git</repo>
- <issue>https://github.com/MobileChromeApps/cordova-crosswalk-engine/issues</issue>
+ <repo>https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview</repo>
+ <issue>https://crosswalk-project.org/jira</issue>
<engines>
- <engine name="cordova-android" version=">=4" />
- <engine name="cordova-plugman" version=">=4.2.0" /><!-- needed for gradleReference support -->
+ <engine name="cordova-android" version=">=4"/>
+ <engine name="cordova-plugman" version=">=4.2.0"/><!-- needed for gradleReference support -->
</engines>
+ <!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
- <preference name="webView" value="org.crosswalk.engine.XWalkWebViewEngine" />
+ <preference name="webView" value="org.crosswalk.engine.XWalkWebViewEngine"/>
+ <preference name="xwalkVersion" default="14+"/>
+ <preference name="xwalkCommandLine" default="--disable-pull-to-refresh-effect"/>
+ <preference name="xwalkMode" default="embedded" />
</config-file>
- <source-file src="src/android/XWalkWebViewEngine.java" target-dir="src/org/crosswalk/engine" />
- <source-file src="src/android/XWalkExposedJsApi.java" target-dir="src/org/crosswalk/engine" />
- <source-file src="src/android/XWalkCordovaResourceClient.java" target-dir="src/org/crosswalk/engine" />
- <source-file src="src/android/XWalkCordovaUiClient.java" target-dir="src/org/crosswalk/engine" />
- <source-file src="src/android/XWalkCordovaView.java" target-dir="src/org/crosswalk/engine" />
- <source-file src="src/android/XWalkCordovaCookieManager.java" target-dir="src/org/crosswalk/engine" />
+ <config-file target="AndroidManifest.xml" parent="/*">
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+ </config-file>
+
+ <source-file src="platforms/android/src/org/crosswalk/engine/XWalkWebViewEngine.java" target-dir="src/org/crosswalk/engine"/>
+ <source-file src="platforms/android/src/org/crosswalk/engine/XWalkExposedJsApi.java" target-dir="src/org/crosswalk/engine"/>
+ <source-file src="platforms/android/src/org/crosswalk/engine/XWalkCordovaResourceClient.java" target-dir="src/org/crosswalk/engine"/>
+ <source-file src="platforms/android/src/org/crosswalk/engine/XWalkCordovaUiClient.java" target-dir="src/org/crosswalk/engine"/>
+ <source-file src="platforms/android/src/org/crosswalk/engine/XWalkCordovaView.java" target-dir="src/org/crosswalk/engine"/>
+ <source-file src="platforms/android/src/org/crosswalk/engine/XWalkCordovaCookieManager.java" target-dir="src/org/crosswalk/engine"/>
+
+ <framework src="platforms/android/xwalk.gradle" custom="true" type="gradleReference"/>
- <framework src="src/android/xwalk.gradle" custom="true" type="gradleReference" />
+ <hook type="after_plugin_install" src="hooks/after_plugin_install/000-shared_mode_special.js"/>
+ <hook type="before_plugin_uninstall" src="hooks/before_plugin_uninstall/000-shared_mode_special.js"/>
</platform>
</plugin>
diff --git a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaCookieManager.java b/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaCookieManager.java
deleted file mode 100644
index 43f170d2..00000000
--- a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaCookieManager.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-package org.crosswalk.engine;
-
-import org.apache.cordova.ICordovaCookieManager;
-import org.xwalk.core.internal.XWalkCookieManager;
-
-class XWalkCordovaCookieManager implements ICordovaCookieManager {
-
- protected XWalkCookieManager cookieManager = null;
-
- public XWalkCordovaCookieManager() {
- cookieManager = new XWalkCookieManager();
- }
-
- public void setCookiesEnabled(boolean accept) {
- cookieManager.setAcceptCookie(accept);
- }
-
- public void setCookie(final String url, final String value) {
- cookieManager.setCookie(url, value);
- }
-
- public String getCookie(final String url) {
- return cookieManager.getCookie(url);
- }
-
- public void clearCookies() {
- cookieManager.removeAllCookie();
- }
-
- public void flush() {
- cookieManager.flushCookieStore();
- }
-};
-
-
diff --git a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaResourceClient.java b/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaResourceClient.java
deleted file mode 100644
index 57d0b0f9..00000000
--- a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaResourceClient.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-package org.crosswalk.engine;
-
-import android.net.Uri;
-import android.webkit.WebResourceResponse;
-
-import org.apache.cordova.CordovaResourceApi;
-import org.apache.cordova.CordovaResourceApi.OpenForReadResult;
-import org.apache.cordova.LOG;
-import org.chromium.net.NetError;
-import org.xwalk.core.XWalkResourceClient;
-import org.xwalk.core.XWalkView;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-public class XWalkCordovaResourceClient extends XWalkResourceClient {
-
- private static final String TAG = "XWalkCordovaResourceClient";
- protected XWalkWebViewEngine parentEngine;
-
- // Success
- public static final int ERROR_OK = 0;
- // Generic error
- public static final int ERROR_UNKNOWN = -1;
- // Server or proxy hostname lookup failed
- public static final int ERROR_HOST_LOOKUP = -2;
- // Unsupported authentication scheme (not basic or digest)
- public static final int ERROR_UNSUPPORTED_AUTH_SCHEME = -3;
- // User authentication failed on server
- public static final int ERROR_AUTHENTICATION = -4;
- // User authentication failed on proxy
- public static final int ERROR_PROXY_AUTHENTICATION = -5;
- // Failed to connect to the server
- public static final int ERROR_CONNECT = -6;
- // Failed to read or write to the server
- public static final int ERROR_IO = -7;
- // Connection timed out
- public static final int ERROR_TIMEOUT = -8;
- // Too many redirects
- public static final int ERROR_REDIRECT_LOOP = -9;
- // Unsupported URI scheme
- public static final int ERROR_UNSUPPORTED_SCHEME = -10;
- // Failed to perform SSL handshake
- public static final int ERROR_FAILED_SSL_HANDSHAKE = -11;
- // Malformed URL
- public static final int ERROR_BAD_URL = -12;
- // Generic file error
- public static final int ERROR_FILE = -13;
- // File not found
- public static final int ERROR_FILE_NOT_FOUND = -14;
- // Too many requests during this load
- public static final int ERROR_TOO_MANY_REQUESTS = -15;
-
- public XWalkCordovaResourceClient(XWalkWebViewEngine parentEngine) {
- super(parentEngine.webView);
- this.parentEngine = parentEngine;
- }
-
- // Map XWalk error code about loading a page to Android specific ones.
- // XWalk shares the error code with chromium currently.
- static int convertErrorCode(int netError) {
- // Note: many NetError.Error constants don't have an obvious mapping.
- // These will be handled by the default case, ERROR_UNKNOWN.
- switch (netError) {
- case NetError.ERR_UNSUPPORTED_AUTH_SCHEME:
- return ERROR_UNSUPPORTED_AUTH_SCHEME;
-
- case NetError.ERR_INVALID_AUTH_CREDENTIALS:
- case NetError.ERR_MISSING_AUTH_CREDENTIALS:
- case NetError.ERR_MISCONFIGURED_AUTH_ENVIRONMENT:
- return ERROR_AUTHENTICATION;
-
- case NetError.ERR_TOO_MANY_REDIRECTS:
- return ERROR_REDIRECT_LOOP;
-
- case NetError.ERR_UPLOAD_FILE_CHANGED:
- return ERROR_FILE_NOT_FOUND;
-
- case NetError.ERR_INVALID_URL:
- return ERROR_BAD_URL;
-
- case NetError.ERR_DISALLOWED_URL_SCHEME:
- case NetError.ERR_UNKNOWN_URL_SCHEME:
- return ERROR_UNSUPPORTED_SCHEME;
-
- case NetError.ERR_IO_PENDING:
- case NetError.ERR_NETWORK_IO_SUSPENDED:
- return ERROR_IO;
-
- case NetError.ERR_CONNECTION_TIMED_OUT:
- case NetError.ERR_TIMED_OUT:
- return ERROR_TIMEOUT;
-
- case NetError.ERR_FILE_TOO_BIG:
- return ERROR_FILE;
-
- case NetError.ERR_HOST_RESOLVER_QUEUE_TOO_LARGE:
- case NetError.ERR_INSUFFICIENT_RESOURCES:
- case NetError.ERR_OUT_OF_MEMORY:
- return ERROR_TOO_MANY_REQUESTS;
-
- case NetError.ERR_CONNECTION_CLOSED:
- case NetError.ERR_CONNECTION_RESET:
- case NetError.ERR_CONNECTION_REFUSED:
- case NetError.ERR_CONNECTION_ABORTED:
- case NetError.ERR_CONNECTION_FAILED:
- case NetError.ERR_SOCKET_NOT_CONNECTED:
- return ERROR_CONNECT;
-
- case NetError.ERR_INTERNET_DISCONNECTED:
- case NetError.ERR_ADDRESS_INVALID:
- case NetError.ERR_ADDRESS_UNREACHABLE:
- case NetError.ERR_NAME_NOT_RESOLVED:
- case NetError.ERR_NAME_RESOLUTION_FAILED:
- return ERROR_HOST_LOOKUP;
-
- case NetError.ERR_SSL_PROTOCOL_ERROR:
- case NetError.ERR_SSL_CLIENT_AUTH_CERT_NEEDED:
- case NetError.ERR_TUNNEL_CONNECTION_FAILED:
- case NetError.ERR_NO_SSL_VERSIONS_ENABLED:
- case NetError.ERR_SSL_VERSION_OR_CIPHER_MISMATCH:
- case NetError.ERR_SSL_RENEGOTIATION_REQUESTED:
- case NetError.ERR_CERT_ERROR_IN_SSL_RENEGOTIATION:
- case NetError.ERR_BAD_SSL_CLIENT_AUTH_CERT:
- case NetError.ERR_SSL_NO_RENEGOTIATION:
- case NetError.ERR_SSL_DECOMPRESSION_FAILURE_ALERT:
- case NetError.ERR_SSL_BAD_RECORD_MAC_ALERT:
- case NetError.ERR_SSL_UNSAFE_NEGOTIATION:
- case NetError.ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY:
- case NetError.ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED:
- case NetError.ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY:
- return ERROR_FAILED_SSL_HANDSHAKE;
-
- case NetError.ERR_PROXY_AUTH_UNSUPPORTED:
- case NetError.ERR_PROXY_AUTH_REQUESTED:
- case NetError.ERR_PROXY_CONNECTION_FAILED:
- case NetError.ERR_UNEXPECTED_PROXY_AUTH:
- return ERROR_PROXY_AUTHENTICATION;
-
- // The certificate errors are handled by onReceivedSslError
- // and don't need to be reported here.
- case NetError.ERR_CERT_COMMON_NAME_INVALID:
- case NetError.ERR_CERT_DATE_INVALID:
- case NetError.ERR_CERT_AUTHORITY_INVALID:
- case NetError.ERR_CERT_CONTAINS_ERRORS:
- case NetError.ERR_CERT_NO_REVOCATION_MECHANISM:
- case NetError.ERR_CERT_UNABLE_TO_CHECK_REVOCATION:
- case NetError.ERR_CERT_REVOKED:
- case NetError.ERR_CERT_INVALID:
- case NetError.ERR_CERT_WEAK_SIGNATURE_ALGORITHM:
- case NetError.ERR_CERT_NON_UNIQUE_NAME:
- return ERROR_OK;
-
- default:
- return ERROR_UNKNOWN;
- }
- }
-
- /**
- * Report an error to the host application. These errors are unrecoverable (i.e. the main resource is unavailable).
- * The errorCode parameter corresponds to one of the ERROR_* constants.
- *
- * @param view The WebView that is initiating the callback.
- * @param errorCode The error code corresponding to an ERROR_* value.
- * @param description A String describing the error.
- * @param failingUrl The url that failed to load.
- */
- @Override
- public void onReceivedLoadError(XWalkView view, int errorCode, String description,
- String failingUrl) {
- LOG.d(TAG, "CordovaWebViewClient.onReceivedError: Error code=%s Description=%s URL=%s", errorCode, description, failingUrl);
-
- // Convert the XWalk error code to Cordova error code, which follows the Android spec,
- // http://developer.android.com/reference/android/webkit/WebViewClient.html.
- errorCode = XWalkCordovaResourceClient.convertErrorCode(errorCode);
- parentEngine.client.onReceivedError(errorCode, description, failingUrl);
- }
-
- @Override
- public WebResourceResponse shouldInterceptLoadRequest(XWalkView view, String url) {
- try {
- // Check the against the white-list.
- if (!parentEngine.pluginManager.shouldAllowRequest(url)) {
- LOG.w(TAG, "URL blocked by whitelist: " + url);
- // Results in a 404.
- return new WebResourceResponse("text/plain", "UTF-8", null);
- }
-
- CordovaResourceApi resourceApi = parentEngine.resourceApi;
- Uri origUri = Uri.parse(url);
- // Allow plugins to intercept WebView requests.
- Uri remappedUri = resourceApi.remapUri(origUri);
-
- if (!origUri.equals(remappedUri)) {
- OpenForReadResult result = resourceApi.openForRead(remappedUri, true);
- return new WebResourceResponse(result.mimeType, "UTF-8", result.inputStream);
- }
- // If we don't need to special-case the request, let the browser load it.
- return null;
- } catch (IOException e) {
- if (!(e instanceof FileNotFoundException)) {
- LOG.e(TAG, "Error occurred while loading a file (returning a 404).", e);
- }
- // Results in a 404.
- return new WebResourceResponse("text/plain", "UTF-8", null);
- }
- }
-
- @Override
- public boolean shouldOverrideUrlLoading(XWalkView view, String url) {
- return parentEngine.client.onNavigationAttempt(url);
- }
-}
diff --git a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaUiClient.java b/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaUiClient.java
deleted file mode 100644
index a5a20b70..00000000
--- a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaUiClient.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-package org.crosswalk.engine;
-
-import android.app.Activity;
-import android.content.ActivityNotFoundException;
-import android.content.Intent;
-import android.net.Uri;
-import android.util.Log;
-import android.webkit.ValueCallback;
-
-import org.apache.cordova.CordovaDialogsHelper;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.LOG;
-import org.xwalk.core.XWalkJavascriptResult;
-import org.xwalk.core.XWalkUIClient;
-import org.xwalk.core.XWalkView;
-
-public class XWalkCordovaUiClient extends XWalkUIClient {
- private static final String TAG = "XWalkCordovaUiClient";
- protected final CordovaDialogsHelper dialogsHelper;
- protected final XWalkWebViewEngine parentEngine;
-
- private static final int FILECHOOSER_RESULTCODE = 5173;
-
- public XWalkCordovaUiClient(XWalkWebViewEngine parentEngine) {
- super(parentEngine.webView);
- this.parentEngine = parentEngine;
- dialogsHelper = new CordovaDialogsHelper(parentEngine.webView.getContext());
- }
-
- @Override
- public boolean onJavascriptModalDialog(XWalkView view, JavascriptMessageType type, String url,
- String message, String defaultValue, XWalkJavascriptResult result) {
- switch (type) {
- case JAVASCRIPT_ALERT:
- return onJsAlert(view, url, message, result);
- case JAVASCRIPT_CONFIRM:
- return onJsConfirm(view, url, message, result);
- case JAVASCRIPT_PROMPT:
- return onJsPrompt(view, url, message, defaultValue, result);
- case JAVASCRIPT_BEFOREUNLOAD:
- // Reuse onJsConfirm to show the dialog.
- return onJsConfirm(view, url, message, result);
- default:
- break;
- }
- assert (false);
- return false;
- }
-
- /**
- * Tell the client to display a javascript alert dialog.
- */
- private boolean onJsAlert(XWalkView view, String url, String message,
- final XWalkJavascriptResult result) {
- dialogsHelper.showAlert(message, new CordovaDialogsHelper.Result() {
- @Override
- public void gotResult(boolean success, String value) {
- if (success) {
- result.confirm();
- } else {
- result.cancel();
- }
- }
- });
- return true;
- }
-
- /**
- * Tell the client to display a confirm dialog to the user.
- */
- private boolean onJsConfirm(XWalkView view, String url, String message,
- final XWalkJavascriptResult result) {
- dialogsHelper.showConfirm(message, new CordovaDialogsHelper.Result() {
- @Override
- public void gotResult(boolean success, String value) {
- if (success) {
- result.confirm();
- } else {
- result.cancel();
- }
- }
- });
- return true;
- }
-
- /**
- * Tell the client to display a prompt dialog to the user.
- * If the client returns true, WebView will assume that the client will
- * handle the prompt dialog and call the appropriate JsPromptResult method.
- * <p/>
- * Since we are hacking prompts for our own purposes, we should not be using them for
- * this purpose, perhaps we should hack console.log to do this instead!
- */
- private boolean onJsPrompt(XWalkView view, String origin, String message, String defaultValue,
- final XWalkJavascriptResult result) {
- // Unlike the @JavascriptInterface bridge, this method is always called on the UI thread.
- String handledRet = parentEngine.bridge.promptOnJsPrompt(origin, message, defaultValue);
- if (handledRet != null) {
- result.confirmWithResult(handledRet);
- } else {
- dialogsHelper.showPrompt(message, defaultValue, new CordovaDialogsHelper.Result() {
- @Override
- public void gotResult(boolean success, String value) {
- if (success) {
- result.confirmWithResult(value);
- } else {
- result.cancel();
- }
- }
- });
-
- }
- return true;
- }
-
- /**
- * Notify the host application that a page has started loading.
- * This method is called once for each main frame load so a page with iframes or framesets will call onPageStarted
- * one time for the main frame. This also means that onPageStarted will not be called when the contents of an
- * embedded frame changes, i.e. clicking a link whose target is an iframe.
- *
- * @param view The webView initiating the callback.
- * @param url The url of the page.
- */
- @Override
- public void onPageLoadStarted(XWalkView view, String url) {
-
- // Only proceed if this is a top-level navigation
- if (view.getUrl() != null && view.getUrl().equals(url)) {
- // Flush stale messages.
- parentEngine.client.onPageStarted(url);
- parentEngine.bridge.reset();
- }
- }
-
- /**
- * Notify the host application that a page has stopped loading.
- * This method is called only for main frame. When onPageLoadStopped() is called, the rendering picture may not be updated yet.
- *
- * @param view The webView initiating the callback.
- * @param url The url of the page.
- * @param status The load status of the webView, can be FINISHED, CANCELLED or FAILED.
- */
- @Override
- public void onPageLoadStopped(XWalkView view, String url, LoadStatus status) {
- LOG.d(TAG, "onPageFinished(" + url + ")");
- if (status == LoadStatus.FINISHED) {
- parentEngine.client.onPageFinishedLoading(url);
- } else if (status == LoadStatus.FAILED) {
- // TODO: Should this call parentEngine.client.onReceivedError()?
- // Right now we call this from ResourceClient, but maybe that is just for sub-resources?
- }
- }
-
- // File Chooser
- @Override
- public void openFileChooser(XWalkView view, final ValueCallback<Uri> uploadFile, String acceptType, String capture) {
- Intent i = new Intent(Intent.ACTION_GET_CONTENT);
- i.addCategory(Intent.CATEGORY_OPENABLE);
- i.setType("*/*"); // TODO: wire this to acceptType.
- Intent intent = Intent.createChooser(i, "File Browser");
- try {
- parentEngine.cordova.startActivityForResult(new CordovaPlugin() {
- @Override
- public void onActivityResult(int requestCode, int resultCode, Intent intent) {
- Uri result = intent == null || resultCode != Activity.RESULT_OK ? null : intent.getData();
- uploadFile.onReceiveValue(result);
- }
- }, intent, FILECHOOSER_RESULTCODE);
- } catch (ActivityNotFoundException e) {
- Log.w("No activity found to handle file chooser intent.", e);
- uploadFile.onReceiveValue(null);
- }
- }
-}
diff --git a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaView.java b/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaView.java
deleted file mode 100644
index 0be2e998..00000000
--- a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkCordovaView.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.crosswalk.engine;
-
-import org.apache.cordova.CordovaPreferences;
-import org.xwalk.core.XWalkPreferences;
-import org.xwalk.core.XWalkResourceClient;
-import org.xwalk.core.XWalkUIClient;
-import org.xwalk.core.XWalkView;
-
-import android.content.Context;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.util.AttributeSet;
-import android.view.KeyEvent;
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.CordovaWebViewEngine;
-
-public class XWalkCordovaView extends XWalkView implements CordovaWebViewEngine.EngineView {
- protected XWalkCordovaResourceClient resourceClient;
- protected XWalkCordovaUiClient uiClient;
- protected XWalkWebViewEngine parentEngine;
-
- private static boolean hasSetStaticPref;
- // This needs to run before the super's constructor.
- private static Context setGlobalPrefs(Context context, CordovaPreferences preferences) {
- if (!hasSetStaticPref) {
- hasSetStaticPref = true;
- ApplicationInfo ai = null;
- try {
- ai = context.getPackageManager().getApplicationInfo(context.getApplicationContext().getPackageName(), PackageManager.GET_META_DATA);
- } catch (PackageManager.NameNotFoundException e) {
- throw new RuntimeException(e);
- }
- boolean prefAnimatable = preferences == null ? false : preferences.getBoolean("CrosswalkAnimatable", false);
- boolean manifestAnimatable = ai.metaData == null ? false : ai.metaData.getBoolean("CrosswalkAnimatable");
- if (prefAnimatable || manifestAnimatable) {
- // Slows it down a bit, but allows for it to be animated by Android View properties.
- XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW, true);
- }
- if ((ai.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
- XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
- }
- XWalkPreferences.setValue(XWalkPreferences.JAVASCRIPT_CAN_OPEN_WINDOW, true);
- XWalkPreferences.setValue(XWalkPreferences.ALLOW_UNIVERSAL_ACCESS_FROM_FILE, true);
- }
- return context;
- }
-
- public XWalkCordovaView(Context context, CordovaPreferences preferences) {
- super(setGlobalPrefs(context, preferences), (AttributeSet)null);
- }
-
- public XWalkCordovaView(Context context, AttributeSet attrs) {
- super(setGlobalPrefs(context, null), attrs);
- }
-
- void init(XWalkWebViewEngine parentEngine) {
- this.parentEngine = parentEngine;
- if (resourceClient == null) {
- setResourceClient(new XWalkCordovaResourceClient(parentEngine));
- }
- if (uiClient == null) {
- setUIClient(new XWalkCordovaUiClient(parentEngine));
- }
- }
-
- @Override
- public void setResourceClient(XWalkResourceClient client) {
- // XWalk calls this method from its constructor.
- if (client instanceof XWalkCordovaResourceClient) {
- this.resourceClient = (XWalkCordovaResourceClient)client;
- }
- super.setResourceClient(client);
- }
-
- @Override
- public void setUIClient(XWalkUIClient client) {
- // XWalk calls this method from its constructor.
- if (client instanceof XWalkCordovaUiClient) {
- this.uiClient = (XWalkCordovaUiClient)client;
- }
- super.setUIClient(client);
- }
-
- @Override
- public boolean dispatchKeyEvent(KeyEvent event) {
- Boolean ret = parentEngine.client.onDispatchKeyEvent(event);
- if (ret != null) {
- return ret.booleanValue();
- }
- return super.dispatchKeyEvent(event);
- }
-
- @Override
- public void pauseTimers() {
- // This is called by XWalkViewInternal.onActivityStateChange().
- // We don't want them paused by default though.
- }
-
- public void pauseTimersForReal() {
- super.pauseTimers();
- }
-
- @Override
- public CordovaWebView getCordovaWebView() {
- return parentEngine == null ? null : parentEngine.getCordovaWebView();
- }
-}
diff --git a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkExposedJsApi.java b/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkExposedJsApi.java
deleted file mode 100644
index 25715216..00000000
--- a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkExposedJsApi.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-package org.crosswalk.engine;
-
-import android.os.Looper;
-
-import org.apache.cordova.CordovaBridge;
-import org.apache.cordova.ExposedJsApi;
-import org.json.JSONException;
-import org.xwalk.core.JavascriptInterface;
-
-class XWalkExposedJsApi implements ExposedJsApi {
- private final CordovaBridge bridge;
-
- XWalkExposedJsApi(CordovaBridge bridge) {
- this.bridge = bridge;
- }
-
- @JavascriptInterface
- public String exec(int bridgeSecret, String service, String action, String callbackId, String arguments) throws JSONException, IllegalAccessException {
- if (Looper.myLooper() == null) {
- Looper.prepare();
- }
- return bridge.jsExec(bridgeSecret, service, action, callbackId, arguments);
- }
-
- @JavascriptInterface
- public void setNativeToJsBridgeMode(int bridgeSecret, int value) throws IllegalAccessException {
- bridge.jsSetNativeToJsBridgeMode(bridgeSecret, value);
- }
-
- @JavascriptInterface
- public String retrieveJsMessages(int bridgeSecret, boolean fromOnlineEvent) throws IllegalAccessException {
- return bridge.jsRetrieveJsMessages(bridgeSecret, fromOnlineEvent);
- }
-}
diff --git a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkWebViewEngine.java b/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkWebViewEngine.java
deleted file mode 100644
index 9e94edbe..00000000
--- a/plugins/cordova-plugin-crosswalk-webview/src/android/XWalkWebViewEngine.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-
-package org.crosswalk.engine;
-
-import android.content.Context;
-import android.view.View;
-
-import org.apache.cordova.CordovaBridge;
-import org.apache.cordova.CordovaInterface;
-import org.apache.cordova.CordovaPreferences;
-import org.apache.cordova.CordovaResourceApi;
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.CordovaWebViewEngine;
-import org.apache.cordova.ICordovaCookieManager;
-import org.apache.cordova.NativeToJsMessageQueue;
-import org.apache.cordova.PluginManager;
-import org.xwalk.core.XWalkNavigationHistory;
-import org.xwalk.core.XWalkView;
-
-/**
- * Glue class between CordovaWebView (main Cordova logic) and XWalkCordovaView (the actual View).
- */
-public class XWalkWebViewEngine implements CordovaWebViewEngine {
-
- public static final String TAG = "XWalkWebViewEngine";
-
- protected final XWalkCordovaView webView;
- protected XWalkCordovaCookieManager cookieManager;
- protected CordovaBridge bridge;
- protected CordovaWebViewEngine.Client client;
- protected CordovaWebView parentWebView;
- protected CordovaInterface cordova;
- protected PluginManager pluginManager;
- protected CordovaResourceApi resourceApi;
- protected NativeToJsMessageQueue nativeToJsMessageQueue;
-
- /** Used when created via reflection. */
- public XWalkWebViewEngine(Context context, CordovaPreferences preferences) {
- this(new XWalkCordovaView(context, preferences));
- }
-
- public XWalkWebViewEngine(XWalkCordovaView webView) {
- this.webView = webView;
- cookieManager = new XWalkCordovaCookieManager();
- }
-
- // Use two-phase init so that the control will work with XML layouts.
-
- @Override
- public void init(CordovaWebView parentWebView, CordovaInterface cordova, CordovaWebViewEngine.Client client,
- CordovaResourceApi resourceApi, PluginManager pluginManager,
- NativeToJsMessageQueue nativeToJsMessageQueue) {
- if (this.cordova != null) {
- throw new IllegalStateException();
- }
- this.parentWebView = parentWebView;
- this.cordova = cordova;
- this.client = client;
- this.resourceApi = resourceApi;
- this.pluginManager = pluginManager;
- this.nativeToJsMessageQueue = nativeToJsMessageQueue;
-
- webView.init(this);
- initWebViewSettings();
-
- nativeToJsMessageQueue.addBridgeMode(new NativeToJsMessageQueue.OnlineEventsBridgeMode(new NativeToJsMessageQueue.OnlineEventsBridgeMode.OnlineEventsBridgeModeDelegate() {
- @Override
- public void setNetworkAvailable(boolean value) {
- webView.setNetworkAvailable(value);
- }
- @Override
- public void runOnUiThread(Runnable r) {
- XWalkWebViewEngine.this.cordova.getActivity().runOnUiThread(r);
- }
- }));
- bridge = new CordovaBridge(pluginManager, nativeToJsMessageQueue);
- exposeJsInterface(webView, bridge);
- }
-
- @Override
- public CordovaWebView getCordovaWebView() {
- return parentWebView;
- }
-
- @Override
- public View getView() {
- return webView;
- }
-
- private void initWebViewSettings() {
- webView.setVerticalScrollBarEnabled(false);
- }
-
- private static void exposeJsInterface(XWalkView webView, CordovaBridge bridge) {
- XWalkExposedJsApi exposedJsApi = new XWalkExposedJsApi(bridge);
- webView.addJavascriptInterface(exposedJsApi, "_cordovaNative");
- }
-
- @Override
- public boolean canGoBack() {
- return this.webView.getNavigationHistory().canGoBack();
- }
-
- @Override
- public boolean goBack() {
- if (this.webView.getNavigationHistory().canGoBack()) {
- this.webView.getNavigationHistory().navigate(XWalkNavigationHistory.Direction.BACKWARD, 1);
- return true;
- }
- return false;
- }
-
- @Override
- public void setPaused(boolean value) {
- if (value) {
- // TODO: I think this has been fixed upstream and we don't need to override pauseTimers() anymore.
- webView.pauseTimersForReal();
- } else {
- webView.resumeTimers();
- }
- }
-
- @Override
- public void destroy() {
- webView.onDestroy();
- }
-
- @Override
- public void clearHistory() {
- this.webView.getNavigationHistory().clear();
- }
-
- @Override
- public void stopLoading() {
- this.webView.stopLoading();
- }
-
- @Override
- public void clearCache() {
- webView.clearCache(true);
- }
-
- @Override
- public String getUrl() {
- return this.webView.getUrl();
- }
-
- @Override
- public ICordovaCookieManager getCookieManager() {
- return cookieManager;
- }
-
- @Override
- public void loadUrl(String url, boolean clearNavigationStack) {
- webView.load(url, null);
- }
-}
diff --git a/plugins/cordova-plugin-crosswalk-webview/src/android/xwalk.gradle b/plugins/cordova-plugin-crosswalk-webview/src/android/xwalk.gradle
deleted file mode 100644
index 3c0a23ee..00000000
--- a/plugins/cordova-plugin-crosswalk-webview/src/android/xwalk.gradle
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-
-def DEFAULT_VERSION = "org.xwalk:xwalk_core_library_beta:13+"
-def DEFAULT_COMMAND_LINE = "--disable-pull-to-refresh-effect"
-
-repositories {
- maven {
- url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
- }
-}
-
-if (cdvBuildMultipleApks == null) {
- ext.cdvBuildMultipleApks = true
-}
-if (cdvMinSdkVersion == null) {
- ext.cdvMinSdkVersion = 14
-}
-
-def getConfigPreference(name, defaultValue) {
- name = name.toLowerCase()
- def xml = file("res/xml/config.xml").getText()
- // Disable namespace awareness since Cordova doesn't use them properly
- def root = new XmlParser(false, false).parseText(xml)
-
- def ret = defaultValue
- root.preference.each { it ->
- def attrName = it.attribute("name")
- if (attrName && attrName.toLowerCase() == name) {
- ret = it.attribute("value")
- }
- }
- return ret
-}
-
-// Set defaults before project's build-extras.gradle
-if (!project.hasProperty('xwalkVersion')) {
- ext.xwalkVersion = getConfigPreference("xwalkversion", DEFAULT_VERSION)
-}
-if (!project.hasProperty('xwalkCommandLine')) {
- ext.xwalkCommandLine = getConfigPreference("xwalkcommandline", DEFAULT_COMMAND_LINE)
-}
-
-// Apply values after project's build-extras.gradle
-cdvPluginPostBuildExtras.add({
-
- def xwalkSpec = xwalkVersion
- if ((xwalkSpec =~ /:/).count == 1) {
- xwalkSpec = "org.xwalk:${xwalkSpec}"
- } else if ((xwalkSpec =~ /:/).count == 0) {
- if (xwalkSpec ==~ /\d+/) {
- xwalkSpec = "${xwalkSpec}+"
- }
- xwalkSpec = "org.xwalk:xwalk_core_library_beta:${xwalkSpec}"
- }
-
- dependencies {
- compile xwalkSpec
- }
-
- if (file('assets/xwalk-command-line').exists()) {
- println('Not writing assets/xwalk-command-line since file already exists.')
- return
- }
- android.applicationVariants.all { variant ->
- def variantName = variant.name.capitalize()
- def mergeTask = tasks["merge${variantName}Assets"]
- def processTask = tasks["process${variantName}Resources"]
- def outFile = new File (mergeTask.outputDir, "xwalk-command-line")
- def newTask = project.task("createXwalkCommandLineFile${variantName}") << {
- mergeTask.outputDir.mkdirs()
- outFile.write("xwalk ${xwalkCommandLine}\n")
- }
- newTask.dependsOn(mergeTask)
- processTask.dependsOn(newTask)
- }
-})
diff --git a/plugins/cordova-plugin-splashscreen/src/browser/SplashScreenProxy.js b/plugins/cordova-plugin-splashscreen/src/browser/SplashScreenProxy.js
index 76d51bfa..d19f8c87 100644
--- a/plugins/cordova-plugin-splashscreen/src/browser/SplashScreenProxy.js
+++ b/plugins/cordova-plugin-splashscreen/src/browser/SplashScreenProxy.js
@@ -21,7 +21,7 @@
// Default parameter values including image size can be changed in `config.xml`
var splashImageWidth = 170;
var splashImageHeight = 200;
-var position = { x: 0, y: 0, width: splashImageWidth, height: splashImageHeight };
+var position = { x: 0, y: 0, width: splashImageWidth, height: splashImageHeight };
var splash = null; //
var localSplash; // the image to display
var localSplashImage;
diff --git a/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.h b/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.h
index 3feede64..0d6ae397 100644
--- a/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.h
+++ b/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.h
@@ -27,7 +27,7 @@ typedef struct {
BOOL iPhone6;
BOOL iPhone6Plus;
BOOL retina;
-
+
} CDV_iOSDevice;
@interface CDVSplashScreen : CDVPlugin {
diff --git a/plugins/cordova-plugin-splashscreen/src/wp/ResolutionHelper.cs b/plugins/cordova-plugin-splashscreen/src/wp/ResolutionHelper.cs
index 2c02e744..050c3927 100644
--- a/plugins/cordova-plugin-splashscreen/src/wp/ResolutionHelper.cs
+++ b/plugins/cordova-plugin-splashscreen/src/wp/ResolutionHelper.cs
@@ -21,12 +21,12 @@ namespace WPCordovaClassLib.Cordova.Commands
public enum Resolutions { WVGA, WXGA, HD };
public static class ResolutionHelper
- {
+ {
public static Resolutions CurrentResolution
{
get
{
- switch (Application.Current.Host.Content.ScaleFactor)
+ switch (Application.Current.Host.Content.ScaleFactor)
{
case 100: return Resolutions.WVGA;
case 160: return Resolutions.WXGA;
@@ -36,4 +36,4 @@ namespace WPCordovaClassLib.Cordova.Commands
}
}
}
-}
+} \ No newline at end of file
diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h
index 4756c79e..be4a7883 100644
--- a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h
+++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h
@@ -6,9 +6,9 @@
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/package.json b/plugins/cordova-plugin-splashscreen/tests/ios/package.json
index 761436c5..d8b23857 100644
--- a/plugins/cordova-plugin-splashscreen/tests/ios/package.json
+++ b/plugins/cordova-plugin-splashscreen/tests/ios/package.json
@@ -9,5 +9,5 @@
},
"scripts": {
"test": "xcodebuild test -workspace CDVSplashScreenTest.xcworkspace -scheme CDVSplashScreenLibTests -destination 'platform=iOS Simulator,name=iPhone 5' CONFIGURATION_BUILD_DIR='/tmp'"
- }
-}
+ }
+} \ No newline at end of file
diff --git a/plugins/cordova-plugin-splashscreen/www/windows/SplashScreenProxy.js b/plugins/cordova-plugin-splashscreen/www/windows/SplashScreenProxy.js
index 1974b7dc..dab72381 100644
--- a/plugins/cordova-plugin-splashscreen/www/windows/SplashScreenProxy.js
+++ b/plugins/cordova-plugin-splashscreen/www/windows/SplashScreenProxy.js
@@ -1,4 +1,4 @@
-/*
+/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -26,7 +26,7 @@ var cordova = require('cordova'),
channel = require('cordova/channel');
var isPhone = (cordova.platformId == "windows") && WinJS.Utilities.isPhone;
-var localSplash = null;
+var localSplash = null;
var bgColor = "#464646"; // default backgrond color; TDOO - read it from .appxmanifest
var splashImageSrc = isPhone ? "ms-appx:///images/splashscreenphone.png" : "ms-appx:///images/splashscreen.png";
diff --git a/plugins/cordova-plugin-whitelist/README.md b/plugins/cordova-plugin-whitelist/README.md
index def10044..f641b450 100644
--- a/plugins/cordova-plugin-whitelist/README.md
+++ b/plugins/cordova-plugin-whitelist/README.md
@@ -1,20 +1,20 @@
-<!---
- license: Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
+<!--
+# license: Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
-->
# cordova-plugin-whitelist
@@ -40,7 +40,7 @@ other URLs, you must add `<allow-navigation>` tags to your `config.xml`:
<!-- Wildcards are allowed for the protocol, as a prefix
to the host, or as a suffix to the path -->
- <allow-havigation href="*://*.example.com/*" />
+ <allow-navigation href="*://*.example.com/*" />
<!-- A wildcard can be used to whitelist the entire network,
over HTTP and HTTPS.
@@ -135,7 +135,7 @@ Here are some example CSP declarations for your `.html` pages:
<meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
<!-- Enable all requests, inline styles, and eval() -->
- <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src: 'self' 'unsafe-inline' 'unsafe-eval'">
+ <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
<!-- Allow XHRs via https only -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
diff --git a/plugins/cordova-plugin-whitelist/RELEASENOTES.md b/plugins/cordova-plugin-whitelist/RELEASENOTES.md
index 703552ca..2fb24dce 100644
--- a/plugins/cordova-plugin-whitelist/RELEASENOTES.md
+++ b/plugins/cordova-plugin-whitelist/RELEASENOTES.md
@@ -26,3 +26,11 @@
* Change ID to cordova-plugin-whitelist rather than reverse-DNS-style
* Tweak CSP examples in README
* CB-8660 remove extra commas from package.json
+
+### 1.1.0 (Jun 17, 2015)
+* CB-9128 cordova-plugin-whitelist documentation translation: cordova-plugin-whitelist
+* fix npm md issue
+* Usage of CDVURLRequestFilter protocol.
+* CB-9089 - iOS whitelist plugin does not compile
+* CB-9090 - Enable whitelist plugin for cordova-ios 4.0.0
+* Fixed error in Content-Security-Policy example
diff --git a/plugins/cordova-plugin-whitelist/doc/de/README.md b/plugins/cordova-plugin-whitelist/doc/de/README.md
new file mode 100644
index 00000000..e97eaa63
--- /dev/null
+++ b/plugins/cordova-plugin-whitelist/doc/de/README.md
@@ -0,0 +1,148 @@
+<!--
+# license: Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+-->
+
+# cordova-plugin-whitelist
+
+Dieses Plugin implementiert eine Whitelist-Politik für die Navigation in der Anwendung Webview Cordova 4.0
+
+## Cordova unterstützte Plattformen
+
+ * Android 4.0.0 oder höher
+ * iOS 4.0.0 oder höher
+
+## Navigation-Whitelist
+
+Steuert, welche URLs die WebView selbst zu navigiert werden kann. Bezieht sich auf der obersten Ebene Navigationen nur.
+
+Macken: auf Android es gilt auch für Iframes für nicht-http(s) Systeme.
+
+In der Standardeinstellung Navigationen nur auf `file://` URLs, sind zulässig. Wenn andere andere URLs zulassen möchten, müssen Sie Ihre `"config.xml"` `<allow-navigation>` Markierungen hinzufügen:
+
+ <!-- Allow links to example.com -->
+ <allow-navigation href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-navigation href="*://*.example.com/*" />
+
+ <!-- A wildcard can be used to whitelist the entire network,
+ over HTTP and HTTPS.
+ *NOT RECOMMENDED* -->
+ <allow-navigation href="*" />
+
+ <!-- The above is equivalent to these three declarations -->
+ <allow-navigation href="http://*/*" />
+ <allow-navigation href="https://*/*" />
+ <allow-navigation href="data:*" />
+
+
+## Vorsatz-Whitelist
+
+Steuert, welche URLs die app zulässig ist, um das System zu öffnen Fragen. Standardmäßig dürfen keine externe URLs.
+
+Das entspricht auf Android eine Absicht des Typs BROWSEABLE senden.
+
+Diese Whitelist gilt nicht für Plugins, nur Hyperlinks und Aufrufe von `window.open()`.
+
+Fügen Sie in `"config.xml"` `<allow-intent>` Tags hinzu, wie folgt:
+
+ <!-- Allow links to web pages to open in a browser -->
+ <allow-intent href="http://*/*" />
+ <allow-intent href="https://*/*" />
+
+ <!-- Allow links to example.com to open in a browser -->
+ <allow-intent href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-intent href="*://*.example.com/*" />
+
+ <!-- Allow SMS links to open messaging app -->
+ <allow-intent href="sms:*" />
+
+ <!-- Allow tel: links to open the dialer -->
+ <allow-intent href="tel:*" />
+
+ <!-- Allow geo: links to open maps -->
+ <allow-intent href="geo:*" />
+
+ <!-- Allow all unrecognized URLs to open installed apps
+ *NOT RECOMMENDED* -->
+ <allow-intent href="*" />
+
+
+## Netzwerk-Anforderung-Whitelist
+
+Steuert, welche-Anforderungen Netzwerk (Bilder, XHRs, etc.) dürfen (über Cordova native Haken) erfolgen.
+
+Hinweis: Wir empfehlen Ihnen eine Content Security Policy (siehe unten), das ist sicherer. Diese Whitelist ist vor allem historisch für Webansichten für die CSP nicht unterstützen.
+
+Fügen Sie in `"config.xml"` `<access>` Tags hinzu, wie folgt:
+
+ <!-- Allow images, xhrs, etc. to google.com -->
+ <access origin="http://google.com" />
+ <access origin="https://google.com" />
+
+ <!-- Access to the subdomain maps.google.com -->
+ <access origin="http://maps.google.com" />
+
+ <!-- Access to all the subdomains on google.com -->
+ <access origin="http://*.google.com" />
+
+ <!-- Enable requests to content: URLs -->
+ <access origin="content:///*" />
+
+ <!-- Don't block any requests -->
+ <access origin="*" />
+
+
+Ohne `<access>` -Tags dürfen nur Anforderungen an `file://` URLs. Enthält jedoch die Standardanwendung Cordova `<access origin="*">` standardmäßig.
+
+Eigenart: Android kann auch Anforderungen an https://ssl.gstatic.com/accessibility/javascript/android/ standardmäßig, da dies für TalkBack ordnungsgemäß erforderlich ist.
+
+### Content-Security-Policy
+
+Steuert, welche-Anforderungen Netzwerk (Bilder, XHRs, etc.) dürfen (über Webview direkt) erfolgen.
+
+Auf Android und iOS ist die Netzwerk Anfrage Whitelist (s.o.) nicht in der Lage, alle Arten von Anfragen (z.B. `< video >` & WebSockets nicht blockiert) filtern. Also, sollten Sie neben der Whitelist, [Content Security Policy](http://content-security-policy.com/) `< Meta >` -Tags auf allen Ihren Seiten verwenden.
+
+Auf Android Unterstützung für CSP innerhalb der System-Webview beginnt mit KitKat (aber ist in allen Versionen mit Crosswalk WebView verfügbar).
+
+Hier sind einige Beispiel-CSP-Deklarationen für Ihre `HTML` -Seiten:
+
+ <!-- Good default declaration:
+ * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+ * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
+ * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
+ * Enable inline JS: add 'unsafe-inline' to default-src
+ * Enable eval(): add 'unsafe-eval' to default-src
+ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">
+
+ <!-- Allow requests to foo.com -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
+
+ <!-- Enable all requests, inline styles, and eval() -->
+ <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
+
+ <!-- Allow XHRs via https only -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
+
+ <!-- Allow iframe to https://cordova.apache.org/ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org"> \ No newline at end of file
diff --git a/plugins/cordova-plugin-whitelist/doc/es/README.md b/plugins/cordova-plugin-whitelist/doc/es/README.md
new file mode 100644
index 00000000..b3e46849
--- /dev/null
+++ b/plugins/cordova-plugin-whitelist/doc/es/README.md
@@ -0,0 +1,148 @@
+<!--
+# license: Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+-->
+
+# cordova-plugin-whitelist
+
+Este plugin implementa una política de lista blanca para navegar la aplicación webview en Cordova 4.0
+
+## Plataformas soportadas Cordova
+
+ * Android 4.0 o superior
+ * iOS 4.0.0 o superior
+
+## Lista blanca de navegación
+
+Controla que las URLs del WebView se puede navegar a. Se aplica a nivel superior navegaciones solo.
+
+Peculiaridades: en Android también se aplica a iframes para esquemas que son de http (s).
+
+Por defecto, navegaciones solo a direcciones URL `file://` , son permitidas. Para permitir que otros otras URL, debe agregar `< allow-navegación >` etiquetas en el `archivo config.xml`:
+
+ <!-- Allow links to example.com -->
+ <allow-navigation href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-navigation href="*://*.example.com/*" />
+
+ <!-- A wildcard can be used to whitelist the entire network,
+ over HTTP and HTTPS.
+ *NOT RECOMMENDED* -->
+ <allow-navigation href="*" />
+
+ <!-- The above is equivalent to these three declarations -->
+ <allow-navigation href="http://*/*" />
+ <allow-navigation href="https://*/*" />
+ <allow-navigation href="data:*" />
+
+
+## Intención de lista blanca
+
+Controla qué URLs de la aplicación se permite hacer el sistema para abrir. De forma predeterminada, se permiten ninguÌ n external URLs.
+
+En Android, esto equivale a enviar una intención de tipo BROWSEABLE.
+
+Esta lista blanca no se aplica a plugins, sólo los hipervínculos y las llamadas a `window.Open)`.
+
+En `config.xml`, agregar etiquetas `< allow-intent >` , como este:
+
+ <!-- Allow links to web pages to open in a browser -->
+ <allow-intent href="http://*/*" />
+ <allow-intent href="https://*/*" />
+
+ <!-- Allow links to example.com to open in a browser -->
+ <allow-intent href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-intent href="*://*.example.com/*" />
+
+ <!-- Allow SMS links to open messaging app -->
+ <allow-intent href="sms:*" />
+
+ <!-- Allow tel: links to open the dialer -->
+ <allow-intent href="tel:*" />
+
+ <!-- Allow geo: links to open maps -->
+ <allow-intent href="geo:*" />
+
+ <!-- Allow all unrecognized URLs to open installed apps
+ *NOT RECOMMENDED* -->
+ <allow-intent href="*" />
+
+
+## Solicitud de red blanca
+
+Controles que las peticiones de la red (imágenes, XHRs, etc.) se les permite hacer (a través de ganchos nativa de Córdoba).
+
+Nota: Le sugerimos que utilice una política de seguridad de contenido (véase abajo), que es más seguro. Esta lista blanca es sobre todo histórico para webviews que no admiten la CSP.
+
+En `config.xml`, agregue etiquetas de `< access >` , como este:
+
+ <!-- Allow images, xhrs, etc. to google.com -->
+ <access origin="http://google.com" />
+ <access origin="https://google.com" />
+
+ <!-- Access to the subdomain maps.google.com -->
+ <access origin="http://maps.google.com" />
+
+ <!-- Access to all the subdomains on google.com -->
+ <access origin="http://*.google.com" />
+
+ <!-- Enable requests to content: URLs -->
+ <access origin="content:///*" />
+
+ <!-- Don't block any requests -->
+ <access origin="*" />
+
+
+Sin las etiquetas `< access >` , se admiten sólo las solicitudes a direcciones URL `file://` . Sin embargo, la aplicación por defecto de Cordova incluye `< access origin = "*" >` por defecto.
+
+Quirk: Android también permite las solicitudes de https://ssl.gstatic.com/accessibility/javascript/android/ por defecto, puesto que es necesario para TalkBack funcionar correctamente.
+
+### Política de seguridad de contenido
+
+Controles que las peticiones de la red (imágenes, XHRs, etc.) se les permite hacer (vía webview directamente).
+
+En iOS y Android, la red solicitud lista blanca (véase arriba) no es capaz de filtrar todos los tipos de solicitudes (por ejemplo, `< video >` y WebSockets no estén bloqueadas). Así, además de la lista blanca, usted debe utilizar una etiqueta `< meta >` de [Contenido la política de seguridad](http://content-security-policy.com/) en todas las páginas.
+
+En Android, soporte para CSP en el sistema webview comienza con KitKat (pero está disponible en todas las versiones con WebView de paso de peatones).
+
+Aquí están algunas declaraciones de CSP de ejemplo para las páginas `.html` :
+
+ <!-- Good default declaration:
+ * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+ * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
+ * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
+ * Enable inline JS: add 'unsafe-inline' to default-src
+ * Enable eval(): add 'unsafe-eval' to default-src
+ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">
+
+ <!-- Allow requests to foo.com -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
+
+ <!-- Enable all requests, inline styles, and eval() -->
+ <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
+
+ <!-- Allow XHRs via https only -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
+
+ <!-- Allow iframe to https://cordova.apache.org/ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org"> \ No newline at end of file
diff --git a/plugins/cordova-plugin-whitelist/doc/fr/README.md b/plugins/cordova-plugin-whitelist/doc/fr/README.md
new file mode 100644
index 00000000..2a8c4b73
--- /dev/null
+++ b/plugins/cordova-plugin-whitelist/doc/fr/README.md
@@ -0,0 +1,148 @@
+<!--
+# license: Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+-->
+
+# cordova-plugin-whitelist
+
+Ce plugin met en œuvre une politique de liste blanche pour naviguer le webview application sur Cordova 4.0
+
+## Plates-formes prises en charge Cordova
+
+ * 4.0.0 Android ou supérieur
+ * iOS 4.0.0 ou supérieur
+
+## Navigation liste blanche
+
+Contrôle quels URL le WebView lui-même peut être parcourus à. S'applique à des navigations niveau supérieur seulement.
+
+Particularités : sur Android il s'applique également aux iframes pour non-schémas http (s).
+
+Par défaut, navigations qu'aux URL `file://` , sont autorisés. Pour permettre aux autres d'autres URL, vous devez ajouter des balises `<allow-navigation>` à votre `fichier config.xml`:
+
+ <!-- Allow links to example.com -->
+ <allow-navigation href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-navigation href="*://*.example.com/*" />
+
+ <!-- A wildcard can be used to whitelist the entire network,
+ over HTTP and HTTPS.
+ *NOT RECOMMENDED* -->
+ <allow-navigation href="*" />
+
+ <!-- The above is equivalent to these three declarations -->
+ <allow-navigation href="http://*/*" />
+ <allow-navigation href="https://*/*" />
+ <allow-navigation href="data:*" />
+
+
+## Intent Whitelist
+
+Contrôle quels URL l'app n'est autorisé à poser le système d'ouverture. Par défaut, aucun external URL est autorisés.
+
+Sur Android, cela équivaut à envoyer une intention de type BROWSEABLE.
+
+Cette autorisation ne s'applique pas aux plugins, uniquement les liens hypertexte et les appels à `window.open()`.
+
+Dans le `fichier config.xml`, ajouter des balises `<allow-intent>` , comme ceci :
+
+ <!-- Allow links to web pages to open in a browser -->
+ <allow-intent href="http://*/*" />
+ <allow-intent href="https://*/*" />
+
+ <!-- Allow links to example.com to open in a browser -->
+ <allow-intent href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-intent href="*://*.example.com/*" />
+
+ <!-- Allow SMS links to open messaging app -->
+ <allow-intent href="sms:*" />
+
+ <!-- Allow tel: links to open the dialer -->
+ <allow-intent href="tel:*" />
+
+ <!-- Allow geo: links to open maps -->
+ <allow-intent href="geo:*" />
+
+ <!-- Allow all unrecognized URLs to open installed apps
+ *NOT RECOMMENDED* -->
+ <allow-intent href="*" />
+
+
+## Réseau demande liste blanche
+
+Les contrôles dont les demandes de réseau (images, XHRs, etc.) sont autorisés à effectuer (via cordova natif crochets).
+
+Remarque : Nous vous suggérons de qu'utiliser un contenu politique de sécurité (voir ci-dessous), qui est plus sûr. Cette liste blanche est surtout historique pour webviews qui ne prennent pas en charge les CSP.
+
+Dans le `fichier config.xml`, ajouter des balises `<access>` , comme ceci :
+
+ <!-- Allow images, xhrs, etc. to google.com -->
+ <access origin="http://google.com" />
+ <access origin="https://google.com" />
+
+ <!-- Access to the subdomain maps.google.com -->
+ <access origin="http://maps.google.com" />
+
+ <!-- Access to all the subdomains on google.com -->
+ <access origin="http://*.google.com" />
+
+ <!-- Enable requests to content: URLs -->
+ <access origin="content:///*" />
+
+ <!-- Don't block any requests -->
+ <access origin="*" />
+
+
+Sans les balises `<access>` , seules les demandes d'URL `file://` sont autorisés. Toutefois, l'application de Cordoue par défaut inclut `<access origin="*" >` par défaut.
+
+Bizarrerie : Android permet également aux requêtes à https://ssl.gstatic.com/accessibility/javascript/android/ par défaut, puisque c'est nécessaire pour TalkBack fonctionner correctement.
+
+### Politique de sécurité du contenu
+
+Les contrôles dont les demandes de réseau (images, XHRs, etc.) sont autorisés à effectuer (via webview directement).
+
+Sur Android et iOS, la réseau demande liste blanche (voir ci-dessus) n'est pas en mesure de filtrer tous les types de demandes (p. ex. `< video >` & WebSockets ne sont pas bloquées). Ainsi, en plus de la liste blanche, vous devez utiliser une balise `< meta >` de [Contenu politique de sécurité](http://content-security-policy.com/) sur toutes vos pages.
+
+Sur Android, support pour le CSP dans le système webview commence par KitKat (mais n'est disponible sur toutes les versions à l'aide du tableau de concordance WebView).
+
+Voici quelques exemples de déclarations de CSP pour vos pages `.html` :
+
+ <!-- Good default declaration:
+ * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+ * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
+ * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
+ * Enable inline JS: add 'unsafe-inline' to default-src
+ * Enable eval(): add 'unsafe-eval' to default-src
+ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">
+
+ <!-- Allow requests to foo.com -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
+
+ <!-- Enable all requests, inline styles, and eval() -->
+ <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
+
+ <!-- Allow XHRs via https only -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
+
+ <!-- Allow iframe to https://cordova.apache.org/ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org"> \ No newline at end of file
diff --git a/plugins/cordova-plugin-whitelist/doc/it/README.md b/plugins/cordova-plugin-whitelist/doc/it/README.md
new file mode 100644
index 00000000..157dc036
--- /dev/null
+++ b/plugins/cordova-plugin-whitelist/doc/it/README.md
@@ -0,0 +1,148 @@
+<!--
+# license: Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+-->
+
+# cordova-plugin-whitelist
+
+Questo plugin attua una politica di whitelist per spostarsi all'interno dell'applicazione webview in Cordova 4.0
+
+## Piattaforme supportate Cordova
+
+ * Android 4.0.0 o superiore
+ * iOS 4.0.0 o superiore
+
+## Navigazione Whitelist
+
+Controlla quali URL WebView stessa può essere esplorato. Si applica al solo primo livello navigazioni.
+
+Stranezze: su Android vale anche per gli iframe per non-schemi di http (s).
+
+Per impostazione predefinita, navigazioni solo agli URL `file://` , sono ammessi. Per consentire altri altri URL, è necessario aggiungere `<allow-navigation>` tag per il tuo `config. XML`:
+
+ <!-- Allow links to example.com -->
+ <allow-navigation href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-navigation href="*://*.example.com/*" />
+
+ <!-- A wildcard can be used to whitelist the entire network,
+ over HTTP and HTTPS.
+ *NOT RECOMMENDED* -->
+ <allow-navigation href="*" />
+
+ <!-- The above is equivalent to these three declarations -->
+ <allow-navigation href="http://*/*" />
+ <allow-navigation href="https://*/*" />
+ <allow-navigation href="data:*" />
+
+
+## Whitelist intento
+
+Controlla quali URL app è consentito richiedere il sistema di apertura. Per impostazione predefinita, nessun esterno URL sono ammessi.
+
+Su Android, ciò equivale all'invio di un intento di tipo BROWSEABLE.
+
+Questa whitelist non si applica ai plugin, solo i collegamenti ipertestuali e chiamate a `Window`.
+
+In `config. XML`, aggiungere tag `<allow-intent>` , simile al seguente:
+
+ <!-- Allow links to web pages to open in a browser -->
+ <allow-intent href="http://*/*" />
+ <allow-intent href="https://*/*" />
+
+ <!-- Allow links to example.com to open in a browser -->
+ <allow-intent href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-intent href="*://*.example.com/*" />
+
+ <!-- Allow SMS links to open messaging app -->
+ <allow-intent href="sms:*" />
+
+ <!-- Allow tel: links to open the dialer -->
+ <allow-intent href="tel:*" />
+
+ <!-- Allow geo: links to open maps -->
+ <allow-intent href="geo:*" />
+
+ <!-- Allow all unrecognized URLs to open installed apps
+ *NOT RECOMMENDED* -->
+ <allow-intent href="*" />
+
+
+## Rete richiesta Whitelist
+
+Controlli che le richieste di rete (immagini, XHRs, ecc.) sono consentiti (tramite ganci nativo di cordova).
+
+Nota: Si consiglia di che utilizzare un criterio di protezione contenuti (Vedi sotto), che è più sicuro. La whitelist è principalmente storico per visualizzazioni Web che non supportano la CSP.
+
+In `config. XML`, aggiungere tag `< access >` , simile al seguente:
+
+ <!-- Allow images, xhrs, etc. to google.com -->
+ <access origin="http://google.com" />
+ <access origin="https://google.com" />
+
+ <!-- Access to the subdomain maps.google.com -->
+ <access origin="http://maps.google.com" />
+
+ <!-- Access to all the subdomains on google.com -->
+ <access origin="http://*.google.com" />
+
+ <!-- Enable requests to content: URLs -->
+ <access origin="content:///*" />
+
+ <!-- Don't block any requests -->
+ <access origin="*" />
+
+
+Senza qualsiasi tag `< access >` , sono consentite solo le richieste di URL `file://` . Tuttavia, l'applicazione di Cordova predefinito include `< access origin = "*" >` per impostazione predefinita.
+
+Stranezza: Android consente anche alle richieste di https://ssl.gstatic.com/accessibility/javascript/android/ per impostazione predefinita, poiché questa operazione è necessaria per TalkBack funzionare correttamente.
+
+### Politica di sicurezza del contenuto
+
+Controlli che le richieste di rete (immagini, XHRs, ecc.) possono essere effettuate (via webview direttamente).
+
+Su Android e iOS, la rete richiesta whitelist (Vedi sopra) non è in grado di filtrare tutti i tipi di richieste (ad esempio non sono bloccate `< video >` & WebSockets). Così, oltre alla whitelist, è necessario utilizzare un tag `< meta >` [Content Security Policy](http://content-security-policy.com/) su tutte le pagine.
+
+Su Android, supporto per CSP all'interno webview sistema inizia con KitKat (ma è disponibile su tutte le versioni usando Crosswalk WebView).
+
+Ecco alcuni esempi di dichiarazioni di CSP per le pagine `HTML` :
+
+ <!-- Good default declaration:
+ * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+ * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
+ * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
+ * Enable inline JS: add 'unsafe-inline' to default-src
+ * Enable eval(): add 'unsafe-eval' to default-src
+ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">
+
+ <!-- Allow requests to foo.com -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
+
+ <!-- Enable all requests, inline styles, and eval() -->
+ <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
+
+ <!-- Allow XHRs via https only -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
+
+ <!-- Allow iframe to https://cordova.apache.org/ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org"> \ No newline at end of file
diff --git a/plugins/cordova-plugin-whitelist/doc/ja/README.md b/plugins/cordova-plugin-whitelist/doc/ja/README.md
new file mode 100644
index 00000000..6db17f1e
--- /dev/null
+++ b/plugins/cordova-plugin-whitelist/doc/ja/README.md
@@ -0,0 +1,148 @@
+<!--
+# license: Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+-->
+
+# cordova-plugin-whitelist
+
+このプラグイン実装コルドバ 4.0 アプリケーション webview をナビゲートするためのホワイト リスト ポリシー
+
+## サポートされているコルドバのプラットフォーム
+
+ * アンドロイド 4.0.0 以上
+ * iOS 4.0.0 以上
+
+## ナビゲーションのホワイト リスト
+
+WebView 自体に移動に Url を制御します。最上位ナビゲーションのみに適用されます。
+
+癖: Android にもに適用されますの iframe 非-[http スキーム。
+
+既定では、ナビゲーション、 `file://`の Url にのみ許可されます。その他の他の Url を許可するように、 `config.xml`に`<allow-navigation>`タグを追加する必要があります。
+
+ <!-- Allow links to example.com -->
+ <allow-navigation href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-navigation href="*://*.example.com/*" />
+
+ <!-- A wildcard can be used to whitelist the entire network,
+ over HTTP and HTTPS.
+ *NOT RECOMMENDED* -->
+ <allow-navigation href="*" />
+
+ <!-- The above is equivalent to these three declarations -->
+ <allow-navigation href="http://*/*" />
+ <allow-navigation href="https://*/*" />
+ <allow-navigation href="data:*" />
+
+
+## インテントのホワイト リスト
+
+どの Url を開くようにシステムを聞いて、アプリに許可を制御します。 既定では、外部 Url 許可されません。
+
+人造人間、これは型 BROWSEABLE の意図を送信することに相当します。
+
+このホワイト リストはプラグインのみハイパーリンクおよび`window.open()`への呼び出しには適用されません。.
+
+`Config.xml`内の`<allow-intent>`タグは、このようなを追加します。
+
+ <!-- Allow links to web pages to open in a browser -->
+ <allow-intent href="http://*/*" />
+ <allow-intent href="https://*/*" />
+
+ <!-- Allow links to example.com to open in a browser -->
+ <allow-intent href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-intent href="*://*.example.com/*" />
+
+ <!-- Allow SMS links to open messaging app -->
+ <allow-intent href="sms:*" />
+
+ <!-- Allow tel: links to open the dialer -->
+ <allow-intent href="tel:*" />
+
+ <!-- Allow geo: links to open maps -->
+ <allow-intent href="geo:*" />
+
+ <!-- Allow all unrecognized URLs to open installed apps
+ *NOT RECOMMENDED* -->
+ <allow-intent href="*" />
+
+
+## ネットワーク要求のホワイト リスト
+
+ネットワーク要求コントロール (画像、XHRs 等) (コルドバ ネイティブ フック) を介して行われることが。
+
+注: より安全なコンテンツ セキュリティ ポリシー (下記参照) を使用してお勧めします。 このホワイト リストほとんどの CSP をサポートしていない web 表示のために歴史的です。
+
+`Config.xml`内のこのような`<access>`タグを追加します。
+
+ <!-- Allow images, xhrs, etc. to google.com -->
+ <access origin="http://google.com" />
+ <access origin="https://google.com" />
+
+ <!-- Access to the subdomain maps.google.com -->
+ <access origin="http://maps.google.com" />
+
+ <!-- Access to all the subdomains on google.com -->
+ <access origin="http://*.google.com" />
+
+ <!-- Enable requests to content: URLs -->
+ <access origin="content:///*" />
+
+ <!-- Don't block any requests -->
+ <access origin="*" />
+
+
+`<access>`タグ、なし`file://` Url に要求のみを許可します。 ただし、既定のコルドバ アプリケーションが含まれています`<access origin="*">`デフォルトで。
+
+気まぐれ: アンドロイドも要求できます https://ssl.gstatic.com/accessibility/javascript/android/デフォルトでは、トークが正常に機能するために必要ですので。
+
+### コンテンツのセキュリティ ポリシー
+
+ネットワーク要求コントロール (画像、XHRs 等) (直接 webview) を介して行われることが。
+
+Android と iOS は、ネットワーク要求ホワイト リスト (上記参照) はすべての種類の要求 (例: `< ビデオ >` & Websocket がふさがれていない) をフィルター処理できません。 だから、ホワイト リストに加えてすべてのページに[コンテンツ セキュリティ ポリシー](http://content-security-policy.com/) `< meta >`タグを使用する必要があります。
+
+Android 上システム webview 内 CSP サポート キットカットから始まります (しかし横断歩道 WebView を使用してすべてのバージョンで利用可能です)。
+
+`.Html`ページのいくつかの例 CSP の宣言は次のとおりです。
+
+ <!-- Good default declaration:
+ * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+ * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
+ * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
+ * Enable inline JS: add 'unsafe-inline' to default-src
+ * Enable eval(): add 'unsafe-eval' to default-src
+ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">
+
+ <!-- Allow requests to foo.com -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
+
+ <!-- Enable all requests, inline styles, and eval() -->
+ <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
+
+ <!-- Allow XHRs via https only -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
+
+ <!-- Allow iframe to https://cordova.apache.org/ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org"> \ No newline at end of file
diff --git a/plugins/cordova-plugin-whitelist/doc/ko/README.md b/plugins/cordova-plugin-whitelist/doc/ko/README.md
new file mode 100644
index 00000000..4cbae914
--- /dev/null
+++ b/plugins/cordova-plugin-whitelist/doc/ko/README.md
@@ -0,0 +1,148 @@
+<!--
+# license: Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+-->
+
+# cordova-plugin-whitelist
+
+이 플러그인 구현 코르도바 4.0 응용 프로그램 webview를 탐색에 대 한 허용 정책
+
+## 지원된 코르도바 플랫폼
+
+ * 안 드 로이드 4.0.0 이상
+ * iOS 4.0.0 이상
+
+## 탐색 허용
+
+WebView 자체가 탐색할 수 있는 Url을 제어 합니다. 최상위 탐색에만 적용 됩니다.
+
+단점: 안 드 로이드에도 적용 됩니다 iframe에 대 한 비-프로토콜인 계획.
+
+기본적으로 탐색 `file://` Url에만 사용할 수 있습니다. 다른 다른 Url을 허용 하려면 `config.xml`에 `< allow-navigation >` 태그를 추가 해야 합니다.
+
+ <!-- Allow links to example.com -->
+ <allow-navigation href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-navigation href="*://*.example.com/*" />
+
+ <!-- A wildcard can be used to whitelist the entire network,
+ over HTTP and HTTPS.
+ *NOT RECOMMENDED* -->
+ <allow-navigation href="*" />
+
+ <!-- The above is equivalent to these three declarations -->
+ <allow-navigation href="http://*/*" />
+ <allow-navigation href="https://*/*" />
+ <allow-navigation href="data:*" />
+
+
+## 의도 허용
+
+App 시스템 열을 게 허용 되는 Url을 제어 합니다. 기본적으로 외부 Url은 사용할 수 있습니다.
+
+안 드 로이드에이 형식의 BROWSEABLE 의도 보내는 것 같습니다.
+
+이 허용 된 플러그인, 하이퍼링크 및 `window.open ()` 호출에 적용 되지 않습니다..
+
+`Config.xml`에이 같은 `< allow-intent >` 태그를 추가 합니다.
+
+ <!-- Allow links to web pages to open in a browser -->
+ <allow-intent href="http://*/*" />
+ <allow-intent href="https://*/*" />
+
+ <!-- Allow links to example.com to open in a browser -->
+ <allow-intent href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-intent href="*://*.example.com/*" />
+
+ <!-- Allow SMS links to open messaging app -->
+ <allow-intent href="sms:*" />
+
+ <!-- Allow tel: links to open the dialer -->
+ <allow-intent href="tel:*" />
+
+ <!-- Allow geo: links to open maps -->
+ <allow-intent href="geo:*" />
+
+ <!-- Allow all unrecognized URLs to open installed apps
+ *NOT RECOMMENDED* -->
+ <allow-intent href="*" />
+
+
+## 네트워크 요청 허용
+
+요청을 네트워크 컨트롤 (이미지, XHRs, 등) (코르도바 네이티브 후크)를 통해 할 수 있습니다.
+
+참고: 당신이 사용 콘텐츠 보안 정책 (아래 참조), 더 안전한 것이 좋습니다. 이 허용은 CSP를 지원 하지 않는 webviews에 대 한 역사적.
+
+`Config.xml`에이 같은 `< access >` 태그를 추가 합니다.
+
+ <!-- Allow images, xhrs, etc. to google.com -->
+ <access origin="http://google.com" />
+ <access origin="https://google.com" />
+
+ <!-- Access to the subdomain maps.google.com -->
+ <access origin="http://maps.google.com" />
+
+ <!-- Access to all the subdomains on google.com -->
+ <access origin="http://*.google.com" />
+
+ <!-- Enable requests to content: URLs -->
+ <access origin="content:///*" />
+
+ <!-- Don't block any requests -->
+ <access origin="*" />
+
+
+어떤 `< access >` 태그 없이 요청 `file://` Url 사용할 수 있습니다. 그러나 기본 코르도바 응용 프로그램을 포함 하는, `< access origin="*" >` 기본적으로.
+
+특질: 안 드 로이드 또한 수 있습니다 요청을 https://ssl.gstatic.com/accessibility/javascript/android/ 기본적으로 필요 제대로 작동 하려면 의견 이므로.
+
+### 콘텐츠 보안 정책
+
+요청을 네트워크 컨트롤 (이미지, XHRs, 등) (webview 직접)를 통해 할 수 있습니다.
+
+안 드 로이드와 iOS에 네트워크 요청 허용 (위 참조)는 모든 종류의 요청 (예: `< 비디오 >` & WebSockets 차단 되지 않습니다)를 필터링 할 수 없습니다. 그래서, 허용, 뿐만 아니라 귀하의 모든 페이지에 [콘텐츠 보안 정책](http://content-security-policy.com/) `< meta >` 태그를 사용 해야 합니다.
+
+안 드 로이드, 시스템 webview 내에서 CSP에 대 한 지원을 KitKat 시작 (하지만 횡단 보도 WebView를 사용 하 여 모든 버전에서 사용할 수).
+
+다음은 `.html` 페이지에 대 한 몇 가지 예제 CSP 선언입니다.
+
+ <!-- Good default declaration:
+ * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+ * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
+ * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
+ * Enable inline JS: add 'unsafe-inline' to default-src
+ * Enable eval(): add 'unsafe-eval' to default-src
+ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">
+
+ <!-- Allow requests to foo.com -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
+
+ <!-- Enable all requests, inline styles, and eval() -->
+ <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
+
+ <!-- Allow XHRs via https only -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
+
+ <!-- Allow iframe to https://cordova.apache.org/ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org"> \ No newline at end of file
diff --git a/plugins/cordova-plugin-whitelist/doc/pl/README.md b/plugins/cordova-plugin-whitelist/doc/pl/README.md
new file mode 100644
index 00000000..ecdc3d5c
--- /dev/null
+++ b/plugins/cordova-plugin-whitelist/doc/pl/README.md
@@ -0,0 +1,148 @@
+<!--
+# license: Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+-->
+
+# cordova-plugin-whitelist
+
+Ten plugin wdraża polityki białej nawigacja widoku sieci Web aplikacji na Cordova 4.0
+
+## Cordova obsługiwanych platform
+
+ * Android 4.0.0 lub powyżej
+ * iOS 4.0.0 lub powyżej
+
+## Biała lista nawigacji
+
+Kontroluje, których adresy URL widoku sieci Web, samej można nawigować do. Dotyczy tylko najwyższego poziomu nawigacje.
+
+Dziwactwa: na Android to dotyczy także IFRAME do nie-http (s) systemów.
+
+Domyślnie, nawigacje tylko do URLi `file://` , są dozwolone. Aby zezwolić na inne adresy URL, należy dodać Tagi `< allow-navigation >` do pliku `config.xml`:
+
+ <!-- Allow links to example.com -->
+ <allow-navigation href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-navigation href="*://*.example.com/*" />
+
+ <!-- A wildcard can be used to whitelist the entire network,
+ over HTTP and HTTPS.
+ *NOT RECOMMENDED* -->
+ <allow-navigation href="*" />
+
+ <!-- The above is equivalent to these three declarations -->
+ <allow-navigation href="http://*/*" />
+ <allow-navigation href="https://*/*" />
+ <allow-navigation href="data:*" />
+
+
+## Zamiarem biała
+
+Kontroluje, których adresy URL aplikacji jest możliwość zapytać systemem otwierania. Domyślnie nie ma zewnętrznych adresów URL są dozwolone.
+
+Na Android to przyrównuje do wysyłania zamiarem typu BROWSEABLE.
+
+Ta biała nie ma zastosowania do pluginów, tylko hiperłącza i wywołania `window.open()`.
+
+W `pliku config.xml`dodawanie tagów `< allow-intent >` , jak to:
+
+ <!-- Allow links to web pages to open in a browser -->
+ <allow-intent href="http://*/*" />
+ <allow-intent href="https://*/*" />
+
+ <!-- Allow links to example.com to open in a browser -->
+ <allow-intent href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-intent href="*://*.example.com/*" />
+
+ <!-- Allow SMS links to open messaging app -->
+ <allow-intent href="sms:*" />
+
+ <!-- Allow tel: links to open the dialer -->
+ <allow-intent href="tel:*" />
+
+ <!-- Allow geo: links to open maps -->
+ <allow-intent href="geo:*" />
+
+ <!-- Allow all unrecognized URLs to open installed apps
+ *NOT RECOMMENDED* -->
+ <allow-intent href="*" />
+
+
+## Sieci wniosek biała
+
+Formanty, które sieci żądań (obrazy, XHRs, itp.) mogą być wykonane (za pośrednictwem cordova rodzimych haki).
+
+Uwaga: Zalecamy, że używasz treści polityki bezpieczeństwa (patrz poniżej), który jest bardziej bezpieczne. Ta Biała jest głównie historyczne dla webviews, które nie obsługują CSP.
+
+W `pliku config.xml`dodawanie tagów `< access >` , jak to:
+
+ <!-- Allow images, xhrs, etc. to google.com -->
+ <access origin="http://google.com" />
+ <access origin="https://google.com" />
+
+ <!-- Access to the subdomain maps.google.com -->
+ <access origin="http://maps.google.com" />
+
+ <!-- Access to all the subdomains on google.com -->
+ <access origin="http://*.google.com" />
+
+ <!-- Enable requests to content: URLs -->
+ <access origin="content:///*" />
+
+ <!-- Don't block any requests -->
+ <access origin="*" />
+
+
+Bez żadnych tagów `< access >` dozwolone są tylko żądania do URLi `file://` . Jednak domyślnie Cordova aplikacja zawiera `< access origin = "*" >` domyślnie.
+
+Cokół: Android pozwala również żądania do https://ssl.gstatic.com/accessibility/javascript/android/ domyślnie, ponieważ jest to wymagane dla TalkBack wobec funkcja poprawnie.
+
+### Zasady zabezpieczeń zawartości
+
+Formanty, które sieci żądań (obrazy, XHRs, itp.) mogą być wykonane (za pomocą widoku sieci Web bezpośrednio).
+
+Na Androida i iOS biała żądanie sieci (patrz wyżej) nie jest w stanie filtrować wszystkie rodzaje wniosków (np. `< video >` & WebSockets nie są zablokowane). Tak oprócz białej listy, należy użyć tagu `< meta >` [Treści polityki bezpieczeństwa](http://content-security-policy.com/) na wszystkich stronach.
+
+Na Android wsparcie dla CSP w ramach systemu widoku sieci Web zaczyna KitKat (ale jest dostępne we wszystkich wersjach przy użyciu widoku sieci Web przejście dla pieszych).
+
+Oto niektóre przykład CSP deklaracje dla strony `HTML` :
+
+ <!-- Good default declaration:
+ * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+ * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
+ * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
+ * Enable inline JS: add 'unsafe-inline' to default-src
+ * Enable eval(): add 'unsafe-eval' to default-src
+ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">
+
+ <!-- Allow requests to foo.com -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
+
+ <!-- Enable all requests, inline styles, and eval() -->
+ <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
+
+ <!-- Allow XHRs via https only -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
+
+ <!-- Allow iframe to https://cordova.apache.org/ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org"> \ No newline at end of file
diff --git a/plugins/cordova-plugin-whitelist/doc/zh/README.md b/plugins/cordova-plugin-whitelist/doc/zh/README.md
new file mode 100644
index 00000000..c2c7e112
--- /dev/null
+++ b/plugins/cordova-plugin-whitelist/doc/zh/README.md
@@ -0,0 +1,148 @@
+<!--
+# license: Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+-->
+
+# cordova-plugin-whitelist
+
+這個外掛程式實現一個用於導航在科爾多瓦 4.0 應用程式 web 視圖的白名單策略
+
+## 支援的科爾多瓦平臺
+
+ * Android 4.0.0 或以上
+ * iOS 4.0.0 或以上
+
+## 導航白名單
+
+控制 web 視圖本身可以導航到的 Url。適用于頂級導航只。
+
+怪癖: 在 Android 上它也適用于 iframe 的非-結計畫。
+
+預設情況下,只有到`file://` Url 導航允許。若要允許其他其他 Url,必須將`<allow-navigation>`標籤添加到您的`config.xml`:
+
+ <!-- Allow links to example.com -->
+ <allow-navigation href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-navigation href="*://*.example.com/*" />
+
+ <!-- A wildcard can be used to whitelist the entire network,
+ over HTTP and HTTPS.
+ *NOT RECOMMENDED* -->
+ <allow-navigation href="*" />
+
+ <!-- The above is equivalent to these three declarations -->
+ <allow-navigation href="http://*/*" />
+ <allow-navigation href="https://*/*" />
+ <allow-navigation href="data:*" />
+
+
+## 科爾多瓦-外掛程式-白名單
+
+控制應用程式允許讓系統打開的 Url。 預設情況下,沒有外部 Url 允許。
+
+在 android 系統,這相當於發送類型 BROWSEABLE 的意圖。
+
+此白名單並不適用于只超連結和對`window.open ()`調用的外掛程式.
+
+在`config.xml`中添加`<allow-intent>`標籤,像這樣:
+
+ <!-- Allow links to web pages to open in a browser -->
+ <allow-intent href="http://*/*" />
+ <allow-intent href="https://*/*" />
+
+ <!-- Allow links to example.com to open in a browser -->
+ <allow-intent href="http://example.com/*" />
+
+ <!-- Wildcards are allowed for the protocol, as a prefix
+ to the host, or as a suffix to the path -->
+ <allow-intent href="*://*.example.com/*" />
+
+ <!-- Allow SMS links to open messaging app -->
+ <allow-intent href="sms:*" />
+
+ <!-- Allow tel: links to open the dialer -->
+ <allow-intent href="tel:*" />
+
+ <!-- Allow geo: links to open maps -->
+ <allow-intent href="geo:*" />
+
+ <!-- Allow all unrecognized URLs to open installed apps
+ *NOT RECOMMENDED* -->
+ <allow-intent href="*" />
+
+
+## 網路請求白名單
+
+網路請求的控制項 (圖像,XHRs 等) 允許 (通過科爾多瓦本機掛鉤)。
+
+注意: 我們建議你使用內容的安全性原則 (見下文),這是更安全。 此白名單大多是為 webviews 不支援 CSP 的歷史。
+
+在`config.xml`中添加`<access>`標記,像這樣:
+
+ <!-- Allow images, xhrs, etc. to google.com -->
+ <access origin="http://google.com" />
+ <access origin="https://google.com" />
+
+ <!-- Access to the subdomain maps.google.com -->
+ <access origin="http://maps.google.com" />
+
+ <!-- Access to all the subdomains on google.com -->
+ <access origin="http://*.google.com" />
+
+ <!-- Enable requests to content: URLs -->
+ <access origin="content:///*" />
+
+ <!-- Don't block any requests -->
+ <access origin="*" />
+
+
+沒有任何`<access>`標籤,只到`file://` Url 允許請求。 但是,預設的科爾多瓦應用程式包括`<access origin="*">` ,預設情況。
+
+怪癖: Android 還允許對 HTTPs://ssl.gstatic.com/accessibility/javascript/android/ 請求預設情況下,因為這是對講正常所需。
+
+### 內容安全政策
+
+網路請求的控制項 (圖像,XHRs 等) 允許 (通過 web 視圖直接)。
+
+對 Android 和 iOS,網路請求白名單 (見上文) 是不能夠過濾所有類型的請求 (例如`<video>` & Websocket 未被阻止)。 那麼,除了白名單中,你應使用[內容安全性原則](http://content-security-policy.com/) `< 元 >`標記您的所有頁面。
+
+在 android 系統,對 CSP 系統 web 視圖的支援開始奇巧 (但是是上使用 web 視圖人行橫道上的所有版本可用)。
+
+下面是一些示例 CSP 聲明為`.html`頁面:
+
+ <!-- Good default declaration:
+ * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+ * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
+ * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
+ * Enable inline JS: add 'unsafe-inline' to default-src
+ * Enable eval(): add 'unsafe-eval' to default-src
+ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">
+
+ <!-- Allow requests to foo.com -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
+
+ <!-- Enable all requests, inline styles, and eval() -->
+ <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
+
+ <!-- Allow XHRs via https only -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
+
+ <!-- Allow iframe to https://cordova.apache.org/ -->
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org"> \ No newline at end of file
diff --git a/plugins/cordova-plugin-whitelist/package.json b/plugins/cordova-plugin-whitelist/package.json
index 2c72e256..3eb64e94 100644
--- a/plugins/cordova-plugin-whitelist/package.json
+++ b/plugins/cordova-plugin-whitelist/package.json
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-whitelist",
- "version": "1.0.0",
+ "version": "1.1.0",
"description": "Cordova Whitelist Plugin",
"cordova": {
"platforms": [
@@ -10,7 +10,7 @@
},
"repository": {
"type": "git",
- "url": "https://git-wip-us.apache.org/repos/asf/cordova-plugin-whitelist.git"
+ "url": "https://github.com/apache/cordova-plugin-whitelist"
},
"keywords": [
"cordova",
diff --git a/plugins/cordova-plugin-whitelist/plugin.xml b/plugins/cordova-plugin-whitelist/plugin.xml
index 2ec60b3c..ea802bf8 100644
--- a/plugins/cordova-plugin-whitelist/plugin.xml
+++ b/plugins/cordova-plugin-whitelist/plugin.xml
@@ -20,7 +20,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-whitelist"
- version="1.0.0">
+ version="1.1.0">
<name>Whitelist</name>
<description>Cordova Network Whitelist Plugin</description>
<license>Apache 2.0</license>
@@ -28,6 +28,7 @@
<engines>
<engine name="cordova-android" version=">=4.0.0-dev" />
+ <engine name="cordova-ios" version=">=4.0.0-dev" />
</engines>
<platform name="android">
@@ -44,4 +45,20 @@
<runs />
</js-module>
</platform>
+
+ <platform name="ios">
+ <config-file target="config.xml" parent="/*">
+ <feature name="Whitelist">
+ <param name="ios-package" value="CDVNavigationWhitelistPlugin" />
+ <param name="onload" value="true" />
+ </feature>
+ </config-file>
+ <header-file src="src/ios/CDVNavigationWhitelistPlugin.h" />
+ <source-file src="src/ios/CDVNavigationWhitelistPlugin.m" />
+
+ <js-module src="whitelist.js" name="whitelist">
+ <runs />
+ </js-module>
+ </platform>
+
</plugin>
diff --git a/plugins/cordova-plugin-whitelist/src/ios/CDVNavigationWhitelistPlugin.h b/plugins/cordova-plugin-whitelist/src/ios/CDVNavigationWhitelistPlugin.h
index d0b93654..c1c13010 100644
--- a/plugins/cordova-plugin-whitelist/src/ios/CDVNavigationWhitelistPlugin.h
+++ b/plugins/cordova-plugin-whitelist/src/ios/CDVNavigationWhitelistPlugin.h
@@ -20,12 +20,10 @@
#import <UIKit/UIKit.h>
#import <Cordova/CDVPlugin.h>
#import <Cordova/CDVWhitelist.h>
+#import <Cordova/CDVURLRequestFilter.h>
-@interface CDVNavigationWhitelistPlugin : CDVPlugin {}
+@interface CDVNavigationWhitelistPlugin : CDVPlugin <CDVURLRequestFilter>{}
@property (nonatomic, readonly, strong) CDVWhitelist* whitelist; // readonly for public
-- (BOOL)shouldAllowNavigationToURL:(NSURL *)url;
-- (BOOL)shouldAllowRequestForURL:(NSURL *)url;
-
@end
diff --git a/plugins/cordova-plugin-whitelist/src/ios/CDVNavigationWhitelistPlugin.m b/plugins/cordova-plugin-whitelist/src/ios/CDVNavigationWhitelistPlugin.m
index 5895e89b..11525f23 100644
--- a/plugins/cordova-plugin-whitelist/src/ios/CDVNavigationWhitelistPlugin.m
+++ b/plugins/cordova-plugin-whitelist/src/ios/CDVNavigationWhitelistPlugin.m
@@ -76,7 +76,7 @@
- (void)setViewController:(UIViewController *)viewController
{
if ([viewController isKindOfClass:[CDVViewController class]]) {
- CDVWhitelistConfigParser *whitelistConfigParser = [[CDVWhitelistConfigParser alloc] init];
+ CDVNavigationWhitelistConfigParser *whitelistConfigParser = [[CDVNavigationWhitelistConfigParser alloc] init];
[(CDVViewController *)viewController parseSettingsWithParser:whitelistConfigParser];
self.whitelist = [[CDVWhitelist alloc] initWithArray:whitelistConfigParser.whitelistHosts];
}
diff --git a/plugins/fetch.json b/plugins/fetch.json
index 3bf1f5f1..f7992c50 100644
--- a/plugins/fetch.json
+++ b/plugins/fetch.json
@@ -43,14 +43,6 @@
"is_top_level": true,
"variables": {}
},
- "cordova-plugin-crosswalk-webview": {
- "source": {
- "type": "registry",
- "id": "cordova-plugin-crosswalk-webview"
- },
- "is_top_level": true,
- "variables": {}
- },
"nl.x-services.plugins.insomnia": {
"source": {
"type": "git",
@@ -138,5 +130,21 @@
},
"is_top_level": true,
"variables": {}
+ },
+ "cordova-plugin-crosswalk-webview": {
+ "source": {
+ "type": "registry",
+ "id": "cordova-plugin-crosswalk-webview"
+ },
+ "is_top_level": true,
+ "variables": {}
+ },
+ "cordova-plugin-ios-longpress-fix": {
+ "source": {
+ "type": "registry",
+ "id": "cordova-plugin-ios-longpress-fix"
+ },
+ "is_top_level": true,
+ "variables": {}
}
} \ No newline at end of file
diff --git a/plugins/ios.json b/plugins/ios.json
index 62fd20e8..7d334945 100644
--- a/plugins/ios.json
+++ b/plugins/ios.json
@@ -67,6 +67,10 @@
{
"xml": "<feature name=\"TouchID\"><param name=\"ios-package\" value=\"TouchID\" /></feature>",
"count": 1
+ },
+ {
+ "xml": "<feature name=\"LongPressFix\"><param name=\"ios-package\" value=\"LongPressFix\" /><param name=\"onload\" value=\"true\" /></feature>",
+ "count": 1
}
]
}
@@ -120,9 +124,6 @@
"com.phonegap.plugins.OrientationLock": {
"PACKAGE_NAME": "com.pliablepixels.zmninja"
},
- "cordova-plugin-crosswalk-webview": {
- "PACKAGE_NAME": "com.pliablepixels.zmninja"
- },
"cordova-plugin-file": {
"PACKAGE_NAME": "com.pliablepixels.zmninja"
},
@@ -161,6 +162,12 @@
},
"cordova-plugin-touchid": {
"PACKAGE_NAME": "com.pliablepixels.zmninja"
+ },
+ "cordova-plugin-crosswalk-webview": {
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
+ },
+ "cordova-plugin-ios-longpress-fix": {
+ "PACKAGE_NAME": "com.pliablepixels.zmninja"
}
},
"dependent_plugins": {}