From d9900ba783ee6aeeecb81f23153e5cffe9b8ced4 Mon Sep 17 00:00:00 2001 From: Mario Rosa Date: Fri, 5 Dec 2014 09:21:01 -0500 Subject: [PATCH 01/45] InAppBrowser, iOS: Setting setStatusBarStyle to -1 causes CGContextSaveGState. Simple if statement to ensure -1 is not submitted to setStatusBarStyle. --- src/ios/CDVInAppBrowser.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 4169b6e6b..6a1431a45 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -441,7 +441,9 @@ - (void)browserExit self.inAppBrowserViewController = nil; if (IsAtLeastiOSVersion(@"7.0")) { - [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; + if (_previousStatusBarStyle != -1) { + [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; + } } _previousStatusBarStyle = -1; // this value was reset before reapplying it. caused statusbar to stay black on ios7 From 16353c346670980ca993633624dd4f75ba17ca94 Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Tue, 24 Mar 2015 18:11:28 +0300 Subject: [PATCH 02/45] CB-8661 Return executed script result on Windows --- README.md | 4 ++++ src/windows/InAppBrowserProxy.js | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47bbac04c..274dc940a 100644 --- a/README.md +++ b/README.md @@ -349,6 +349,10 @@ The function is passed an `InAppBrowserEvent` object. - only __code__ key is supported. +### Windows Quirks + +Due to [MSDN docs](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) the invoked script can return only string values, otherwise the parameter, passed to __callback__ will be `[null]`. + ## insertCSS > Injects CSS into the `InAppBrowser` window. diff --git a/src/windows/InAppBrowserProxy.js b/src/windows/InAppBrowserProxy.js index da5eb822c..d31be2d2d 100644 --- a/src/windows/InAppBrowserProxy.js +++ b/src/windows/InAppBrowserProxy.js @@ -242,7 +242,10 @@ var IAB = { if (isWebViewAvailable && browserWrap && popup) { var op = popup.invokeScriptAsync("eval", code); - op.oncomplete = function () { hasCallback && win([]); }; + op.oncomplete = function (e) { + var result = [e.target.result]; + hasCallback && win(result); + }; op.onerror = function () { }; op.start(); } @@ -261,7 +264,10 @@ var IAB = { Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).done(function (file) { Windows.Storage.FileIO.readTextAsync(file).done(function (code) { var op = popup.invokeScriptAsync("eval", code); - op.oncomplete = function () { hasCallback && win([]); }; + op.oncomplete = function(e) { + var result = [e.target.result]; + hasCallback && win(result); + }; op.onerror = function () { }; op.start(); }); From 461d9e9c4c14479af97e33f925388b1fc20eb838 Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Wed, 25 Mar 2015 15:03:30 +0300 Subject: [PATCH 03/45] CB-8635 Improves UX on windows platform * Adds `fullscreen` option * Adds ability to apply custom styles to IAB window --- README.md | 5 ++++ plugin.xml | 1 + src/windows/InAppBrowserProxy.js | 30 +++++++++++++---------- www/inappbrowser.css | 42 ++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 www/inappbrowser.css diff --git a/README.md b/README.md index 274dc940a..1a7c2df9b 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ instance, or the system browser. Windows only: - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. + - __fullscreen__: set to `yes` to create the browser control without a border around it. Please note that if __location=no__ is also specified, there will be no control presented to user to close IAB window. ### Supported Platforms @@ -167,6 +168,10 @@ opened with `target='_blank'`. The rules might look like these } ``` +### Windows Quirks + +Similar to Firefox OS IAB window visual behaviour can be overridden via `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` CSS classes + ### Browser Quirks - Plugin is implemented via iframe, diff --git a/plugin.xml b/plugin.xml index 05a8bcb2e..77f051e81 100644 --- a/plugin.xml +++ b/plugin.xml @@ -197,6 +197,7 @@ + diff --git a/src/windows/InAppBrowserProxy.js b/src/windows/InAppBrowserProxy.js index d31be2d2d..cee0de993 100644 --- a/src/windows/InAppBrowserProxy.js +++ b/src/windows/InAppBrowserProxy.js @@ -34,7 +34,8 @@ var browserWrap, navigationButtonsDivInner, backButton, forwardButton, - closeButton; + closeButton, + bodyOverflowStyle; // x-ms-webview is available starting from Windows 8.1 (platformId is 'windows') // http://msdn.microsoft.com/en-us/library/windows/apps/dn301831.aspx @@ -86,6 +87,8 @@ var IAB = { if (win) win({ type: "exit" }); browserWrap.parentNode.removeChild(browserWrap); + // Reset body overflow style to initial value + document.body.style.msOverflowStyle = bodyOverflowStyle; browserWrap = null; popup = null; } @@ -109,24 +112,25 @@ var IAB = { } else { // "_blank" or anything else if (!browserWrap) { + var browserWrapStyle = document.createElement('link'); + browserWrapStyle.rel = "stylesheet"; + browserWrapStyle.type = "text/css"; + browserWrapStyle.href = urlutil.makeAbsolute("/www/css/inappbrowser.css"); + + document.head.appendChild(browserWrapStyle); + browserWrap = document.createElement("div"); - // First reset all styles for inappbrowser wrapper element - browserWrap.style.cssText = "margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background: 0 0;"; - browserWrap.style.position = "fixed"; - browserWrap.style.top = "0px"; - browserWrap.style.left = "0px"; - browserWrap.style.width = "100%"; - browserWrap.style.height = "100%"; - browserWrap.style.zIndex = 9999; - browserWrap.style.border = "40px solid rgba(0,0,0,0.25)"; + browserWrap.className = "inAppBrowserWrap"; + + if (features.indexOf("fullscreen=yes") > -1) { + browserWrap.classList.add("inAppBrowserWrapFullscreen"); + } // Save body overflow style to be able to reset it back later - var bodyOverflow = document.body.style.msOverflowStyle; + bodyOverflowStyle = document.body.style.msOverflowStyle; browserWrap.onclick = function () { setTimeout(function () { - // Reset body overflow style to initial value - document.body.style.msOverflowStyle = bodyOverflow; IAB.close(win); }, 0); }; diff --git a/www/inappbrowser.css b/www/inappbrowser.css new file mode 100644 index 000000000..4dfb503e0 --- /dev/null +++ b/www/inappbrowser.css @@ -0,0 +1,42 @@ +/* + * 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. + */ + +.inAppBrowserWrap { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: 0 0; + position: fixed; + top: 0; + left: 0; + width: calc(100% - 80px); + height: calc(100% - 80px); + z-index: 9999999; + border: 40px solid #bfbfbf; + border: 40px solid rgba(0, 0, 0, 0.25); +} + +.inAppBrowserWrapFullscreen { + width: 100%; + height: 100%; + border: 0; +} From dfd099958152ea0f3c9e2f4af9a3a7ee5ff6e0bc Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Fri, 3 Apr 2015 12:34:06 -0700 Subject: [PATCH 04/45] CB-4930 - (prefix) InAppBrowser should take into account the status bar --- src/ios/CDVInAppBrowser.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 6d141d3e8..24f56c49f 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -975,6 +975,20 @@ + (CDVInAppBrowserOptions*)parseOptions:(NSString*)options @implementation CDVInAppBrowserNavigationController : UINavigationController +- (void) viewDidLoad { + + CGRect frame = [UIApplication sharedApplication].statusBarFrame; + + // simplified from: http://stackoverflow.com/a/25669695/219684 + + UIToolbar* bgToolbar = [[UIToolbar alloc] initWithFrame:frame]; + bgToolbar.barStyle = UIBarStyleDefault; + [self.view addSubview:bgToolbar]; + + [super viewDidLoad]; +} + + #pragma mark CDVScreenOrientationDelegate - (BOOL)shouldAutorotate From e2865db2eae80a2ab37e951856a39540f6534e16 Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Wed, 1 Apr 2015 16:57:58 +0300 Subject: [PATCH 05/45] CB-7689 Adds insertCSS support for windows platform --- README.md | 1 + src/windows/InAppBrowserProxy.js | 43 +++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a7c2df9b..31a3c72f8 100644 --- a/README.md +++ b/README.md @@ -377,6 +377,7 @@ Due to [MSDN docs](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.cont - Amazon Fire OS - Android - iOS +- Windows ### Quick Example diff --git a/src/windows/InAppBrowserProxy.js b/src/windows/InAppBrowserProxy.js index cee0de993..817516e50 100644 --- a/src/windows/InAppBrowserProxy.js +++ b/src/windows/InAppBrowserProxy.js @@ -213,7 +213,7 @@ var IAB = { IAB.close(win); }, 0); }); - + if (!isWebViewAvailable) { // iframe navigation is not yet supported backButton.disabled = true; @@ -277,9 +277,50 @@ var IAB = { }); }); } + }, + + injectStyleCode: function (win, fail, args) { + var code = args[0], + hasCallback = args[1]; + + if (isWebViewAvailable && browserWrap && popup) { + injectCSS(popup, code, hasCallback && win); + } + }, + + injectStyleFile: function (win, fail, args) { + var filePath = args[0], + hasCallback = args[1]; + + filePath = filePath && urlutil.makeAbsolute(filePath); + + if (isWebViewAvailable && browserWrap && popup) { + var uri = new Windows.Foundation.Uri(filePath); + Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).then(function (file) { + return Windows.Storage.FileIO.readTextAsync(file); + }).done(function (code) { + injectCSS(popup, code, hasCallback && win); + }, function () { + // no-op, just catch an error + }); + } } }; +function injectCSS (webView, cssCode, callback) { + // This will automatically escape all thing that we need (quotes, slashes, etc.) + var escapedCode = JSON.stringify(cssCode); + var evalWrapper = "(function(d){var c=d.createElement('style');c.innerHTML=%s;d.head.appendChild(c);})(document)" + .replace('%s', escapedCode); + + var op = webView.invokeScriptAsync("eval", evalWrapper); + op.oncomplete = function() { + callback && callback([]); + }; + op.onerror = function () { }; + op.start(); +} + module.exports = IAB; require("cordova/exec/proxy").add("InAppBrowser", module.exports); From ea7e7674f848db2217ed40d0ecdcfccc4248891e Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Thu, 9 Apr 2015 17:01:06 -0700 Subject: [PATCH 06/45] CB-8746 gave plugin major version bump --- package.json | 2 +- plugin.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 20db4260e..15e8a0d5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "0.6.1-dev", + "version": "1.0.0-dev", "description": "Cordova InAppBrowser Plugin", "cordova": { "id": "cordova-plugin-inappbrowser", diff --git a/plugin.xml b/plugin.xml index 77f051e81..c94652454 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.0-dev"> InAppBrowser Cordova InAppBrowser Plugin From 11a2acfd7b8c07ece4b03815af7b6f9b0ead318e Mon Sep 17 00:00:00 2001 From: aroberson Date: Fri, 10 Apr 2015 08:53:48 -0500 Subject: [PATCH 07/45] Fixed zIndex issue on Windows 8, 8.1 where InAppBrowser opens behind default app. --- www/windows8/InAppBrowserProxy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/windows8/InAppBrowserProxy.js b/www/windows8/InAppBrowserProxy.js index 944284e57..34cc90266 100644 --- a/www/windows8/InAppBrowserProxy.js +++ b/www/windows8/InAppBrowserProxy.js @@ -62,6 +62,7 @@ var IAB = { browserWrap.style.borderWidth = "40px"; browserWrap.style.borderStyle = "solid"; browserWrap.style.borderColor = "rgba(0,0,0,0.25)"; + browserWrap.style.zIndex = "9999999"; browserWrap.onclick = function () { setTimeout(function () { From 8175122c038773f6119e6da590c69746517b4f68 Mon Sep 17 00:00:00 2001 From: aroberson Date: Mon, 13 Apr 2015 15:33:03 -0500 Subject: [PATCH 08/45] Invoke webview if using local file --- www/windows8/InAppBrowserProxy.js | 53 ++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/www/windows8/InAppBrowserProxy.js b/www/windows8/InAppBrowserProxy.js index 34cc90266..42d15d2c1 100644 --- a/www/windows8/InAppBrowserProxy.js +++ b/www/windows8/InAppBrowserProxy.js @@ -17,13 +17,12 @@ * specific language governing permissions and limitations * under the License. * -*/ + */ /*jslint sloppy:true */ /*global Windows:true, require, document, setTimeout, window, module */ - var cordova = require('cordova'), channel = require('cordova/channel'); @@ -39,9 +38,9 @@ var IAB = { }, show: function (win, lose) { /* empty block, ran out of bacon? - if (browserWrap) { + if (browserWrap) { - }*/ + }*/ }, open: function (win, lose, args) { var strUrl = args[0], @@ -72,20 +71,38 @@ var IAB = { document.body.appendChild(browserWrap); } - - elem = document.createElement("iframe"); - elem.style.width = (window.innerWidth - 80) + "px"; - elem.style.height = (window.innerHeight - 80) + "px"; - elem.style.borderWidth = "0px"; - elem.name = "targetFrame"; - elem.src = strUrl; - - window.addEventListener("resize", function () { - if (browserWrap && elem) { - elem.style.width = (window.innerWidth - 80) + "px"; - elem.style.height = (window.innerHeight - 80) + "px"; - } - }); + var localFile = (strUrl.indexOf('ms-appdata:///') > -1); + if (localFile) { + elem = document.createElement("x-ms-webview"); + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + elem.style.borderWidth = "0px"; + elem.name = "targetFrame"; + elem.src = strUrl; + + window.addEventListener("resize", function () { + if (browserWrap && elem) { + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + } + }); + + } else { + elem = document.createElement("iframe"); + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + elem.style.borderWidth = "0px"; + elem.name = "targetFrame"; + elem.src = strUrl; + + + window.addEventListener("resize", function () { + if (browserWrap && elem) { + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + } + }); + } browserWrap.appendChild(elem); } else { From aacf70f8881577071617c90b31bf5864e197bd50 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 15 Apr 2015 11:06:38 -0700 Subject: [PATCH 09/45] CB-8858 Updated version and RELEASENOTES.md for release 1.0.0 --- RELEASENOTES.md | 26 ++++++++++++++++++++++++++ plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4709ceb54..f7a24cc03 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -164,3 +164,29 @@ * ubuntu: implement inject* functions * ubuntu: port to oxide * CB-7897 ios, android: Update to work with whilelist plugins in Cordova 4.x + +### 1.0.0 (Apr 15, 2015) +* CB-8746 gave plugin major version bump +* CB-7689 Adds insertCSS support for windows platform +* CB-4930 - (prefix) InAppBrowser should take into account the status bar +* CB-8635 Improves UX on windows platform +* CB-8661 Return executed script result on Windows +* CB-8683 updated wp and browser specific references of old id to new id +* CB-8683 changed plugin-id to pacakge-name +* CB-8653 properly updated translated docs to use new id +* CB-8653 updated translated docs to use new id +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* CB-8432 Correct styles for browser wrapper to display it correctly on some pages +* CB-8659 - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) +* CB-7961 Add cordova-plugin-inappbrowser support for browser platform +* CB-8653 Updated Readme +* Update docs for Android zoom=no option +* Added option to disable/enable zoom controls +* updated docs, set hardwareback default to true +* Add a hardwareback option to allow for the hardware back button to go back. +* CB-8570 Integrate TravisCI +* CB-8438 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* CB-8538 Added package.json file +* Keep external android pages in a single tab. (close #61) +* CB-8444 Add a clobber for `cordova.InAppBrowser.open` (close #80) +* CB-8444 Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` diff --git a/plugin.xml b/plugin.xml index c94652454..16ac0d19b 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.0"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 8d468fe5a..2993fa8cb 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.0"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 05fa172116e29bffdc5827f33d7ad9fc696e0c68 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 15 Apr 2015 13:55:47 -0700 Subject: [PATCH 10/45] CB-8858 Incremented plugin version. --- plugin.xml | 2 +- tests/plugin.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.xml b/plugin.xml index 16ac0d19b..dcd630953 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.1-dev"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 2993fa8cb..9c0733619 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.1-dev"> Cordova InAppBrowser Plugin Tests Apache 2.0 From f614dc319354b820c903139ca257fa1bf373c768 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 15 Apr 2015 14:31:08 -0700 Subject: [PATCH 11/45] Revert "CB-8858 Incremented plugin version." This reverts commit 05fa172116e29bffdc5827f33d7ad9fc696e0c68. --- plugin.xml | 2 +- tests/plugin.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.xml b/plugin.xml index dcd630953..16ac0d19b 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.0"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 9c0733619..2993fa8cb 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.0"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 7d1b584306ca8ae74ec41df590f2cd389c014cd3 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 15 Apr 2015 15:50:47 -0700 Subject: [PATCH 12/45] CB-8858 Updated version in package.json for release 1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 15e8a0d5c..e35e1dc38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "1.0.0-dev", + "version": "1.0.0", "description": "Cordova InAppBrowser Plugin", "cordova": { "id": "cordova-plugin-inappbrowser", From ba7cbe58d5812b51c3ece1e6b445248252c298f6 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 15 Apr 2015 16:00:22 -0700 Subject: [PATCH 13/45] CB-8858 Incremented plugin version. --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e35e1dc38..96fc0d08e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "1.0.0", + "version": "1.0.1-dev", "description": "Cordova InAppBrowser Plugin", "cordova": { "id": "cordova-plugin-inappbrowser", diff --git a/plugin.xml b/plugin.xml index 16ac0d19b..dcd630953 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.1-dev"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 2993fa8cb..9c0733619 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.1-dev"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 77d0c999984268576d6876d7746e4851a53d7907 Mon Sep 17 00:00:00 2001 From: Raymond Camden Date: Tue, 2 Jun 2015 10:56:15 -0500 Subject: [PATCH 14/45] fix npm md issue --- README.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 31a3c72f8..7567d40af 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ - # cordova-plugin-inappbrowser From de9f3e35b449fcfc2873e2decea302c67a60c8b2 Mon Sep 17 00:00:00 2001 From: Victor Sosa Date: Fri, 12 Jun 2015 09:41:39 -0500 Subject: [PATCH 15/45] CB-9128 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser --- doc/de/README.md | 388 ++++++++++++++++++++++++++++++ doc/es/README.md | 388 ++++++++++++++++++++++++++++++ doc/fr/README.md | 388 ++++++++++++++++++++++++++++++ doc/it/README.md | 388 ++++++++++++++++++++++++++++++ doc/ja/README.md | 388 ++++++++++++++++++++++++++++++ doc/ko/README.md | 388 ++++++++++++++++++++++++++++++ doc/pl/README.md | 388 ++++++++++++++++++++++++++++++ doc/zh/README.md | 388 ++++++++++++++++++++++++++++++ src/blackberry10/doc/de/README.md | 24 ++ src/blackberry10/doc/es/README.md | 24 ++ src/blackberry10/doc/fr/README.md | 24 ++ src/blackberry10/doc/it/README.md | 24 ++ src/blackberry10/doc/ja/README.md | 24 ++ src/blackberry10/doc/ko/README.md | 24 ++ src/blackberry10/doc/pl/README.md | 24 ++ src/blackberry10/doc/zh/README.md | 24 ++ 16 files changed, 3296 insertions(+) create mode 100644 doc/de/README.md create mode 100644 doc/es/README.md create mode 100644 doc/fr/README.md create mode 100644 doc/it/README.md create mode 100644 doc/ja/README.md create mode 100644 doc/ko/README.md create mode 100644 doc/pl/README.md create mode 100644 doc/zh/README.md create mode 100644 src/blackberry10/doc/de/README.md create mode 100644 src/blackberry10/doc/es/README.md create mode 100644 src/blackberry10/doc/fr/README.md create mode 100644 src/blackberry10/doc/it/README.md create mode 100644 src/blackberry10/doc/ja/README.md create mode 100644 src/blackberry10/doc/ko/README.md create mode 100644 src/blackberry10/doc/pl/README.md create mode 100644 src/blackberry10/doc/zh/README.md diff --git a/doc/de/README.md b/doc/de/README.md new file mode 100644 index 000000000..2ee92f851 --- /dev/null +++ b/doc/de/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Dieses Plugin bietet eine Web-Browser-Ansicht, die beim Aufruf von `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Die `cordova.InAppBrowser.open()` Funktion ist definiert als Ersatz für die `window.open()` Funktion. InAppBrowser Fenster, können vorhandene `window.open()` Aufrufe durch window.open ersetzen: + + window.open = cordova.InAppBrowser.open; + + +Das InAppBrowser-Fenster verhält sich wie einen standard-Webbrowser und Cordova APIs kann nicht zugegriffen werden kann. Aus diesem Grund empfiehlt sich die InAppBrowser Wenn Sie von Drittanbietern (nicht vertrauenswürdige) Inhalte, statt zu laden, die in den wichtigsten Cordova Webview laden müssen. Die InAppBrowser unterliegt nicht der weißen Liste, noch ist Links in der Systembrowser öffnen. + +Die InAppBrowser bietet standardmäßig eine eigene GUI-Steuerelemente für den Benutzer (zurück, vor, erledigt). + +Für rückwärts Kompatibilität, dieses Plugin auch `window.open` Haken. Jedoch kann der Plugin installiert Haken der `window.open` haben unbeabsichtigte Nebenwirkungen (vor allem, wenn dieses Plugin nur als eine Abhängigkeit von einem anderen Plugin enthalten ist). Der Haken der `window.open` wird in einer zukünftigen Version entfernt. Bis der Haken aus dem Plugin entfernt wird, können die Vorgabe von apps manuell wiederherstellen: + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` im globalen Gültigkeitsbereich ist zwar InAppBrowser nicht verfügbar bis nach dem `deviceready`-Ereignis. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + + +Wenn Sie alle Seite Lasten in Ihrer Anwendung durch die InAppBrowser gehen möchten, können Sie einfach `window.open` während der Initialisierung Haken. Zum Beispiel: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Öffnet eine URL in eine neue `InAppBrowser`-Instanz, die aktuelle Browserinstanz oder der Systembrowser. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **Ref**: Bezugnahme auf das `InAppBrowser` Fenster. *(InAppBrowser)* + + * **URL**: die URL um den *(String)* zu laden. Rufen Sie `encodeURI()` auf, wenn die URL Unicode-Zeichen enthält. + + * **target**: das Ziel in welchem die URL geladen werden soll. Standardmäßig entspricht dieser Wert `_self` . *(String)* + + * `_self`: Öffnet sich in der Cordova WebView wenn der URL in der Whitelist ist, andernfalls es öffnet sich in der`InAppBrowser`. + * `_blank`: Öffnet den`InAppBrowser`. + * `_system`: Öffnet in den System-Web-Browser. + + * **options**: Optionen für die `InAppBrowser` . Optional, säumige an: `location=yes` . *(String)* + + Die `options` Zeichenfolge muss keine Leerstelle enthalten, und jede Funktion Name/Wert-Paare müssen durch ein Komma getrennt werden. Featurenamen Groß-/Kleinschreibung. Alle Plattformen unterstützen die anderen Werte: + + * **location**: Legen Sie auf `yes` oder `no` , machen die `InAppBrowser` der Adressleiste ein- oder ausschalten. + + Nur Android: + + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **clearcache**: Legen Sie auf `yes` , der Browser ist Cookiecache gelöscht, bevor das neue Fenster geöffnet wird + * **clearsessioncache**: Legen Sie auf `yes` zu der Session Cookie Cache gelöscht, bevor das neue Fenster geöffnet wird + * **zoom**: Legen Sie auf `yes` zu zeigen Android Browser-Zoom-Steuerelementen, die auf `no` festlegen, um sie zu verbergen. Standardwert ist `yes`. + * **hardwareback**: auf `yes` festlegen, um die Zurück-Taste verwenden, um die `InAppBrowser`Geschichte rückwärts navigieren. Wenn es keine vorherige Seite, wird der `InAppBrowser` geschlossen. Der Standardwert ist `yes`, so dass Sie es auf `no` festlegen müssen, wenn Sie die Schaltfläche "zurück", die InAppBrowser einfach zu schließen möchten. + + iOS nur: + + * **closebuttoncaption**: Legen Sie auf eine Zeichenfolge als Beschriftung der **fertig** -Schaltfläche verwenden. Beachten Sie, dass Sie diesen Wert selbst zu lokalisieren müssen. + * **disallowoverscroll**: Legen Sie auf `yes` oder `no` (Standard ist `no` ). Aktiviert/deaktiviert die UIWebViewBounce-Eigenschaft. + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **clearcache**: Legen Sie auf `yes` , der Browser ist Cookiecache gelöscht, bevor das neue Fenster geöffnet wird + * **clearsessioncache**: Legen Sie auf `yes` zu der Session Cookie Cache gelöscht, bevor das neue Fenster geöffnet wird + * **toolbar**: Legen Sie auf `yes` oder `no` Aktivieren Sie die Symbolleiste ein- oder Ausschalten für InAppBrowser (Standard:`yes`) + * **enableViewportScale**: Legen Sie auf `yes` oder `no` , Viewport Skalierung durch ein Meta-Tag (standardmäßig zu verhindern`no`). + * **mediaPlaybackRequiresUserAction**: Legen Sie auf `yes` oder `no` , HTML5 audio oder video von automatisches Abspielen (standardmäßig zu verhindern`no`). + * **allowInlineMediaPlayback**: Legen Sie auf `yes` oder `no` Inline-HTML5-Media-Wiedergabe, Darstellung im Browser-Fenster, sondern in eine gerätespezifische Wiedergabe-Schnittstelle ermöglichen. Des HTML `video` Element muss auch die `webkit-playsinline` Attribut (Standard:`no`) + * **keyboardDisplayRequiresUserAction**: Legen Sie auf `yes` oder `no` um die Tastatur zu öffnen, wenn Formularelemente Fokus per JavaScript erhalten `focus()` Anruf (Standard:`yes`). + * **suppressesIncrementalRendering**: Legen Sie auf `yes` oder `no` zu warten, bis alle neuen anzeigen-Inhalte empfangen wird, bevor Sie wiedergegeben wird (standardmäßig`no`). + * **presentationstyle**: Legen Sie auf `pagesheet` , `formsheet` oder `fullscreen` [Präsentationsstil](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (standardmäßig fest`fullscreen`). + * **transitionstyle**: Legen Sie auf `fliphorizontal` , `crossdissolve` oder `coververtical` [Übergangsstil](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (standardmäßig fest`coververtical`). + * **toolbarposition**: Legen Sie auf `top` oder `bottom` (Standard ist `bottom` ). Bewirkt, dass die Symbolleiste am oberen oder unteren Rand des Fensters sein. + + Nur Windows: + + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **fullscreen**: auf `yes` festlegen, um das WebBrowser-Steuerelement ohne Rahmen drumherum zu erstellen. Bitte beachten Sie, dass bei **location=no** wird auch angegeben, gibt es keine Kontrolle, die Benutzer zum IAB-Fenster schließen. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS Macken + +Als Plugin jedes Design erzwingen nicht besteht die Notwendigkeit, einige CSS-Regeln hinzuzufügen, wenn bei `target='_blank'`. Die Regeln könnte wie diese aussehen. + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows-Eigenheiten + +Ähnlich wie Firefox OS IAB Fenster visuelle Verhalten kann überschrieben werden, über `InAppBrowserWrap`/`InAppBrowserWrapFullscreen` -CSS-Klassen + +### Browser-Eigenheiten + + * Plugin wird per Iframe implementiert, + + * Navigationsverlauf (Schaltflächen`zurück` und `Vorwärts` in LocationBar) ist nicht implementiert. + +## InAppBrowser + +Bei einem Aufruf von `cordova.InAppBrowser.open` zurückgegebene Objekt.. + +### Methoden + + * addEventListener + * removeEventListener + * Schließen + * Karte + * executeScript + * insertCSS + +## addEventListener + +> Fügt einen Listener für eine Veranstaltung aus der`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + + * **EventName**: das Ereignis zu warten *(String)* + + * **Loadstart**: Ereignis wird ausgelöst, wenn die `InAppBrowser` beginnt, eine URL zu laden. + * **Loadstop**: Ereignis wird ausgelöst, wenn der `InAppBrowser` beendet ist, eine URL laden. + * **LoadError**: Ereignis wird ausgelöst, wenn der `InAppBrowser` ein Fehler auftritt, wenn Sie eine URL zu laden. + * **Ausfahrt**: Ereignis wird ausgelöst, wenn das `InAppBrowser` -Fenster wird geschlossen. + + * **Rückruf**: die Funktion, die ausgeführt wird, wenn das Ereignis ausgelöst wird. Die Funktion übergeben wird ein `InAppBrowserEvent` -Objekt als Parameter. + +### InAppBrowserEvent Eigenschaften + + * **Typ**: Eventname, entweder `loadstart` , `loadstop` , `loaderror` , oder `exit` . *(String)* + + * **URL**: die URL, die geladen wurde. *(String)* + + * **Code**: der Fehler-Code, nur im Fall von `loaderror` . *(Anzahl)* + + * **Nachricht**: die Fehlermeldung angezeigt, nur im Fall von `loaderror` . *(String)* + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Browser-Eigenheiten + +`loadstart` und `loaderror` Ereignisse werden nicht ausgelöst wird. + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Entfernt einen Listener für eine Veranstaltung aus der`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster. *(InAppBrowser)* + + * **EventName**: das Ereignis zu warten. *(String)* + + * **Loadstart**: Ereignis wird ausgelöst, wenn die `InAppBrowser` beginnt, eine URL zu laden. + * **Loadstop**: Ereignis wird ausgelöst, wenn der `InAppBrowser` beendet ist, eine URL laden. + * **LoadError**: Ereignis wird ausgelöst, wenn die `InAppBrowser` trifft einen Fehler beim Laden einer URLs. + * **Ausfahrt**: Ereignis wird ausgelöst, wenn das `InAppBrowser` -Fenster wird geschlossen. + + * **Rückruf**: die Funktion ausgeführt, wenn das Ereignis ausgelöst wird. Die Funktion übergeben wird ein `InAppBrowserEvent` Objekt. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## Schließen + +> Schließt die `InAppBrowser` Fenster. + + ref.close(); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * Firefox OS + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## Karte + +> Zeigt ein InAppBrowser-Fenster, das geöffnet wurde, versteckt. Aufrufen, dies hat keine Auswirkungen, wenn die InAppBrowser schon sichtbar war. + + ref.show(); + + + * **Ref**: Verweis auf die (InAppBrowser) Fenster`InAppBrowser`) + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Fügt JavaScript-Code in das `InAppBrowser` Fenster + + ref.executeScript(details, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster. *(InAppBrowser)* + + * **InjectDetails**: Informationen über das Skript ausgeführt, angeben, entweder ein `file` oder `code` Schlüssel. *(Objekt)* + + * **Datei**: URL des Skripts zu injizieren. + * **Code**: Text des Skripts zu injizieren. + + * **Rückruf**: die Funktion, die ausgeführt wird, nachdem der JavaScript-Code injiziert wird. + + * Wenn das eingefügte Skript vom Typ ist `code` , der Rückruf führt mit einen einzelnen Parameter, der der Rückgabewert des Skripts ist, umwickelt ein `Array` . Bei Multi-Line-Skripten ist der Rückgabewert von der letzten Anweisung oder den letzten Ausdruck ausgewertet. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Browser-Eigenheiten + + * **code** -Schlüssel wird unterstützt. + +### Windows-Eigenheiten + +Aufgrund der [MSDN-Dokumentation](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) das aufgerufene Skript kehren nur Zeichenfolgenwerte, andernfalls des Parameters, an **Rückruf** übergeben werden `[null]`. + +## insertCSS + +> Injiziert CSS in der `InAppBrowser` Fenster. + + ref.insertCSS(details, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + + * **InjectDetails**: Informationen über das Skript ausgeführt, angeben, entweder ein `file` oder `code` Schlüssel. *(Objekt)* + + * **Datei**: URL des Stylesheets zu injizieren. + * **Code**: Text des Stylesheets zu injizieren. + + * **Rückruf**: die Funktion, die ausgeführt wird, nachdem die CSS injiziert wird. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/doc/es/README.md b/doc/es/README.md new file mode 100644 index 000000000..811439a75 --- /dev/null +++ b/doc/es/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Este plugin proporciona una vista de navegador web que se muestra cuando se llama a `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +El `cordova.InAppBrowser.open()` función se define como un reemplazo de sobreponer para la función `window.Open ()`. Llamadas existentes `window.Open ()` pueden utilizar la ventana InAppBrowser, mediante la sustitución de window.open: + + window.open = cordova.InAppBrowser.open; + + +La ventana de InAppBrowser se comporta como un navegador web estándar y no puede acceder a Cordova APIs. Por este motivo, se recomienda la InAppBrowser si necesita cargar contenido de terceros (confianza), en lugar de que cargar en el principal webview Cordova. El InAppBrowser no está sujeta a la lista blanca, ni va a abrir enlaces en el navegador del sistema. + +El InAppBrowser proporciona por defecto sus propios controles GUI para el usuario (atras, adelante, hacer). + +Para atrás compatibilidad, este plugin también ganchos `window.open`. Sin embargo, el gancho de `window.open` plugin instalado puede tener efectos secundarios no deseados (especialmente si este plugin está incluido únicamente como una dependencia de otro plugin). El gancho de `window.open` se quitará en una versión futura de principal. Hasta que el gancho se ha extraído el plugin, aplicaciones pueden restaurar manualmente el comportamiento por defecto: + + delete window.open // Reverts the call back to it's prototype's default + + +Aunque `window.open` es en el ámbito global, InAppBrowser no está disponible hasta después del evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Instalación + + cordova plugin add cordova-plugin-inappbrowser + + +Si quieres todas las cargas de página en su aplicación para ir a través de la InAppBrowser, simplemente puedes conectar `window.open` durante la inicialización. Por ejemplo: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Se abre una dirección URL en una nueva instancia de `InAppBrowser`, en la instancia actual del navegador o el navegador del sistema. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: referencia a la `InAppBrowser` ventana. *(InAppBrowser)* + + * **url**: el URL para cargar *(String)*. Llame a `encodeURI()` en esto si la URL contiene caracteres Unicode. + + * **target**: el objetivo en el que se carga la URL, un parámetro opcional que se utiliza de forma predeterminada `_self`. *(String)* + + * `_self`: se abre en el Cordova WebView si la URL está en la lista blanca, de lo contrario se abre en el `InAppBrowser`. + * `_blank`: abre en el `InAppBrowser`. + * `_system`: se abre en el navegador del sistema. + + * **options**: opciones para el `InAppBrowser`. Opcional, contumaz a: `location=yes`. *(String)* + + La cadena de `options` no debe contener ningún espacio en blanco, y los pares de nombre y valor de cada característica deben estar separados por una coma. Los nombres de función son minúsculas. Todas las plataformas admiten el valor siguiente: + + * **location**: se establece en `yes` o `no` para activar o desactivar la barra de ubicación de la `InAppBrowser`. + + Sólo Android: + + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **clearcache**: a `yes` para que el navegador es caché de galleta despejado antes de que se abra la nueva ventana + * **clearsessioncache**: a `yes` que la caché de cookie de sesión despejado antes de que se abra la nueva ventana + * **zoom**: establezca en `sí` para mostrar los controles de zoom del navegador de Android, a `no` para ocultarlas. El valor predeterminado es `sí`. + * **hardwareback**: se establece en `sí` para utilizar el botón back de hardware para navegar hacia atrás a través de la historia de la `InAppBrowser`. Si no hay ninguna página anterior, se cerrará el `InAppBrowser` . El valor predeterminado es `sí`, por lo que se debe establecer en `no` si desea que el botón back para simplemente cerrar el InAppBrowser. + + Sólo iOS: + + * **closebuttoncaption**: establecer una cadena para usar como título del botón **hecho** . Tenga en cuenta que necesitas localizar este valor por sí mismo. + * **disallowoverscroll**: A `yes` o `no` (valor por defecto es `no` ). Activa/desactiva la propiedad UIWebViewBounce. + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **clearcache**: a `yes` para que el navegador es caché de galleta despejado antes de que se abra la nueva ventana + * **clearsessioncache**: a `yes` que la caché de cookie de sesión despejado antes de que se abra la nueva ventana + * **barra de herramientas**: a `yes` o `no` para activar la barra de herramientas on u off para el InAppBrowser (por defecto`yes`) + * **enableViewportScale**: Set a `yes` o `no` para evitar viewport escalar a través de una etiqueta meta (por defecto a `no`). + * **mediaPlaybackRequiresUserAction**: Set a `yes` o `no` para evitar HTML5 audio o vídeo de reproducción automática (por defecto a `no`). + * **allowInlineMediaPlayback**: A `yes` o `no` para permitir la reproducción de los medios de comunicación en línea HTML5, mostrando en la ventana del navegador en lugar de una interfaz específica del dispositivo de reproducción. Elemento `video` de HTML también debe incluir el atributo de `webkit-playsinline` (por defecto a `no`) + * **keyboardDisplayRequiresUserAction**: se establece en `yes` o `no` para abrir el teclado cuando elementos de formulario reciben el foco mediante llamada de JavaScript de `focus()` (por defecto a `yes`). + * **suppressesIncrementalRendering**: se establece en `yes` o `no` para esperar hasta que todos los nuevos contenidos de vista se recibieron antes de ser prestados (por defecto a `no`). + * **presentationstyle**: se establece en `pagesheet`, `formsheet` o `fullscreen` para definir el [estilo de la presentación](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (por defecto a `fullscreen`). + * **transitionstyle**: se establece en `fliphorizontal`, `crossdissolve` o `coververtical` para definir el [estilo de transición](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (por defecto `coververtical`). + * **toolbarposition**: A `top` o `bottom` (valor por defecto es `bottom` ). Hace que la barra de herramientas en la parte superior o inferior de la ventana. + + Sólo Windows: + + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **fullscreen**: se establece en `sí` para crear el control del navegador sin un borde alrededor de él. Por favor tenga en cuenta que si **location=no** también se especifica, no habrá ningún control presentado al usuario para cerrar la ventana IAB. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Ejemplo + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS rarezas + +Como plugin no cumplir cualquier diseño es necesario añadir algunas reglas CSS si abre con `target = '_blank'`. Las reglas pueden parecerse a estos + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows rarezas + +Similar al comportamiento visual de la ventana de Firefox OS IAB puede anularse mediante `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` clases CSS + +### Navegador rarezas + + * Plugin se implementa mediante iframe, + + * Historial de navegación (botones`atrás` y `adelante` en LocationBar) no está implementado. + +## InAppBrowser + +El objeto devuelto desde una llamada a `cordova.InAppBrowser.open`. + +### Métodos + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> Añade un detector para un evento de la `InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + + * **eventName**: el evento para escuchar *(String)* + + * **loadstart**: evento se desencadena cuando el `InAppBrowser` comienza a cargar una dirección URL. + * **loadstop**: evento desencadena cuando los acabados `InAppBrowser` cargar una dirección URL. + * **loaderror**: evento se desencadena cuando el `InAppBrowser` encuentra un error al cargar una dirección URL. + * **exit**: evento se desencadena cuando se cierra la ventana de `InAppBrowser`. + + * **callback**: la función que se ejecuta cuando se desencadene el evento. La función se pasa un objeto `InAppBrowserEvent` como un parámetro. + +### InAppBrowserEvent propiedades + + * **type**: eventname, `loadstart`, `loadstop`, `loaderror` o `exit`. *(String)* + + * **url**: la URL que se cargó. *(String)* + + * **code**: el código de error, sólo en el caso de `loaderror`. *(Número)* + + * **message**: el mensaje de error, sólo en el caso de `loaderror`. *(String)* + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Navegador rarezas + +eventos `loadstart` y `loaderror` no son alimentados. + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Elimina un detector para un evento de la `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser`. *(InAppBrowser)* + + * **eventName**: dejar de escuchar para el evento. *(String)* + + * **loadstart**: evento se desencadena cuando el `InAppBrowser` comienza a cargar una dirección URL. + * **loadstop**: evento desencadena cuando los acabados `InAppBrowser` cargar una dirección URL. + * **loaderror**: evento se desencadena cuando el `InAppBrowser` se encuentra con un error al cargar una dirección URL. + * **exit**: evento se desencadena cuando se cierra la ventana de `InAppBrowser`. + + * **callback**: la función a ejecutar cuando se desencadene el evento. La función se pasa un objeto `InAppBrowserEvent`. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Cierra la ventana de `InAppBrowser`. + + ref.close(); + + + * **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + +### Plataformas soportadas + + * Amazon fire OS + * Android + * Firefox OS + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Muestra una ventana InAppBrowser que abrió sus puertas ocultada. Esto no tiene efecto si el InAppBrowser ya era visible. + + ref.show(); + + + * **ref**: referencia a la (ventana) InAppBrowser`InAppBrowser`) + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Inyecta código JavaScript en la ventana de `InAppBrowser` + + ref.executeScript(details, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser`. *(InAppBrowser)* + + * **injectDetails**: detalles de la secuencia de comandos para ejecutar, o especificar un `file` o `code` clave. *(Objeto)* + + * **file**: URL del script para inyectar. + * **code**: texto de la escritura para inyectar. + + * **devolución de llamada**: la función que se ejecuta después de inyecta el código JavaScript. + + * Si el script inyectado es del tipo de `code`, la devolución de llamada se ejecuta con un solo parámetro, que es el valor devuelto del guión, envuelto en una `Array`. Para scripts multilíneas, este es el valor devuelto de la última declaración, o la última expresión evaluada. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Navegador rarezas + + * sólo **code** es compatible. + +### Windows rarezas + +Debido a la [documentación MSDN](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) el script invocado puede devolver únicamente valores de cadena, de lo contrario el parámetro, pasa al **callback** será `[null]`. + +## insertCSS + +> Inyecta CSS en la ventana de `InAppBrowser`. + + ref.insertCSS(details, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + + * **injectDetails**: detalles de la secuencia de comandos para ejecutar, o especificar un `file` o `code` clave. *(Objeto)* + + * **file**: URL de la hoja de estilos para inyectar. + * **code**: texto de la hoja de estilos para inyectar. + + * **callback**: la función que se ejecuta después de inyectar el CSS. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/doc/fr/README.md b/doc/fr/README.md new file mode 100644 index 000000000..73812feec --- /dev/null +++ b/doc/fr/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Ce module fournit une vue de navigateur web qui s'affiche lorsque vous appelez `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Le `cordova.InAppBrowser.open()` fonction est définie pour être un remplacement rapide de la fonction `window.open()`. Les appels existants `window.open()` peuvent utiliser la fenêtre de InAppBrowser, en remplaçant window.open : + + window.open = cordova.InAppBrowser.open; + + +La fenêtre de InAppBrowser se comporte comme un navigateur web standard et ne peut pas accéder aux APIs Cordova. Pour cette raison, le InAppBrowser est recommandé si vous devez charger le contenu de tiers (non approuvé), au lieu de chargement que dans le principaux webview Cordova. Le InAppBrowser n'est pas soumis à la liste blanche, ni s'ouvre les liens dans le navigateur de système. + +Le InAppBrowser fournit par défaut ses propres contrôles de GUI pour l'utilisateur (arrière, avant, fait). + +Pour vers l'arrière la compatibilité, ce plugin crochets également `window.open`. Cependant, le plugin installé crochet de `window.open` peut avoir des effets secondaires involontaires (surtout si ce plugin est inclus uniquement comme une dépendance d'un autre plugin). Le crochet de `window.open` sera supprimé dans une future version majeure. Jusqu'à ce que le crochet est supprimé de la plugin, apps peuvent restaurer manuellement le comportement par défaut : + + delete window.open // Reverts the call back to it's prototype's default + + +Bien que `window.open` est dans la portée globale, InAppBrowser n'est pas disponible jusqu'à ce qu'après l'événement `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + + +Si vous souhaitez que toutes les charges de la page dans votre application de passer par le InAppBrowser, vous pouvez simplement accrocher `window.open` pendant l'initialisation. Par exemple : + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Ouvre une URL dans une nouvelle instance de `InAppBrowser`, l'instance de navigateur actuelle ou dans l'Explorateur du système. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **url** : l'URL à charger *(String)*. À encoder au préalable via `encodeURI()` si celle-ci contient des caractères Unicode. + + * **target** : la cible du chargement de l'URL, ce paramètre est optionnel, sa valeur par défaut est `_self`. *(String)* + + * `_self` : dirige le chargement vers la WebView Cordova si l'URL figure dans la liste blanche, sinon dans une fenêtre `InAppBrowser`. + * `_blank` : dirige le chargement vers une fenêtre `InAppBrowser`. + * `_system` : dirige le chargement vers le navigateur Web du système. + + * **options** : permet de personnaliser la fenêtre `InAppBrowser`. Paramètre facultatif dont la valeur par défaut est `location=yes`. *(String)* + + La chaîne `options` ne doit contenir aucun caractère vide, chaque paire nom/valeur représentant une fonctionnalité doit être séparée de la précédente par une virgule. Les noms de fonctionnalités sont sensibles à la casse. Toutes les plates-formes prennent en charge la valeur ci-dessous : + + * **location** : régler à `yes` ou `no` afin d'afficher ou masquer la barre d'adresse de la fenêtre `InAppBrowser`. + + Android uniquement : + + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre + * **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre + * **zoom**: la valeur `yes` pour afficher les commandes de zoom du navigateur Android, affectez `no` de les cacher. Valeur par défaut est `yes`. + * **hardwareback**: utilisez le bouton de retour de matériel pour naviguer vers l'arrière à travers l'histoire de `InAppBrowser`de la valeur `Oui` . S'il n'y a aucune page précédente, `InAppBrowser` fermera. La valeur par défaut est `yes`, alors vous devez le définir à `no` si vous souhaitez que le bouton back de simplement fermer la InAppBrowser. + + iOS uniquement : + + * **closebuttoncaption**: affectez une chaîne à utiliser comme la **fait** légende du bouton. Notez que vous devrez localiser cette valeur vous-même. + * **disallowoverscroll**: la valeur `yes` ou `no` (valeur par défaut est `no` ). Active/désactive la propriété UIWebViewBounce. + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre + * **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre + * **barre d'outils**: la valeur `yes` ou `no` pour activer la barre d'outils ou désactiver pour le InAppBrowser (par défaut,`yes`) + * **enableViewportScale**: la valeur `yes` ou `no` pour empêcher la fenêtre de mise à l'échelle par une balise meta (par défaut,`no`). + * **mediaPlaybackRequiresUserAction**: la valeur `yes` ou `no` pour empêcher le HTML5 audio ou vidéo de la lecture automatique (par défaut,`no`). + * **allowInlineMediaPlayback**: la valeur `yes` ou `no` pour permettre la lecture du média en ligne HTML5, affichage dans la fenêtre du navigateur plutôt que d'une interface de lecture spécifique au périphérique. L'HTML `video` élément doit également inclure la `webkit-playsinline` attribut (par défaut,`no`) + * **keyboardDisplayRequiresUserAction**: la valeur `yes` ou `no` pour ouvrir le clavier lorsque les éléments reçoivent le focus par l'intermédiaire de JavaScript `focus()` appel (par défaut,`yes`). + * **suppressesIncrementalRendering**: la valeur `yes` ou `no` d'attendre que toutes les nouveautés de vue sont reçue avant d'être restitué (par défaut,`no`). + * **presentationstyle**: la valeur `pagesheet` , `formsheet` ou `fullscreen` pour définir le [style de présentation](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (par défaut,`fullscreen`). + * **transitionstyle**: la valeur `fliphorizontal` , `crossdissolve` ou `coververtical` pour définir le [style de transition](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (par défaut,`coververtical`). + * **toolbarposition**: la valeur `top` ou `bottom` (valeur par défaut est `bottom` ). Causes de la barre d'outils être en haut ou en bas de la fenêtre. + + Windows uniquement : + + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **fullscreen**: défini à `yes` pour créer le contrôle de navigateur sans bordure autour d'elle. Veuillez noter que si **location=no** est également spécifiée, il n'y n'aura aucun contrôle a présenté à l'utilisateur de fermer la fenêtre du CCI. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS Quirks + +Comme plugin n'est pas appliquer n'importe quelle conception il est nécessaire d'ajouter quelques règles CSS si ouvert avec `target= _blank`. Les règles pourraient ressembler à ces + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Bizarreries de Windows + +Semblable à un comportement visuel fenêtre Firefox OS CCI peut être substituée par l'intermédiaire de `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` des classes CSS + +### Bizarreries navigateur + + * Plugin est implémentée via iframe, + + * Historique de navigation (boutons`back` et `forward` dans LocationBar) n'est pas implémentée. + +## InAppBrowser + +L'objet retourné par un appel à `cordova.InAppBrowser.open`. + +### Méthodes + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> Ajoute un écouteur pour un évènement de la fenêtre `InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **eventname** : l'évènement à écouter *(String)* + + * **loadstart** : évènement déclenché lorsque le chargement d'une URL débute dans la fenêtre `InAppBrowser`. + * **loadstop** : évènement déclenché lorsque la fenêtre `InAppBrowser` finit de charger une URL. + * **loaderror** : évènement déclenché si la fenêtre `InAppBrowser` rencontre une erreur lors du chargement d'une URL. + * **exit** : évènement déclenché lorsque la fenêtre `InAppBrowser` est fermée. + + * **callback** : la fonction à exécuter lorsque l'évènement se déclenche. Un objet `InAppBrowserEvent` lui est transmis comme paramètre. + +### Propriétés de InAppBrowserEvent + + * **type** : le nom de l'évènement, soit `loadstart`, `loadstop`, `loaderror` ou `exit`. *(String)* + + * **url** : l'URL ayant été chargée. *(String)* + + * **code** : le code d'erreur, seulement pour `loaderror`. *(Number)* + + * **message** : un message d'erreur, seulement pour `loaderror`. *(String)* + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Bizarreries navigateur + +les événements `loadstart` et `loaderror` ne sont pas déclenchés. + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Supprime un écouteur pour un évènement de la fenêtre `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **eventname** : l'évènement pour lequel arrêter l'écoute. *(String)* + + * **loadstart** : évènement déclenché lorsque le chargement d'une URL débute dans la fenêtre `InAppBrowser`. + * **loadstop** : évènement déclenché lorsque la fenêtre `InAppBrowser` finit de charger une URL. + * **loaderror** : évènement déclenché si la fenêtre `InAppBrowser` rencontre une erreur lors du chargement d'une URL. + * **exit** : évènement déclenché lorsque la fenêtre `InAppBrowser` est fermée. + + * **callback** : la fonction à exécuter lorsque l'évènement se déclenche. Un objet `InAppBrowserEvent` lui est transmis comme paramètre. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Ferme la fenêtre `InAppBrowser`. + + ref.close(); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * Firefox OS + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Affiche une fenêtre InAppBrowser qui a été ouverte cachée. Appeler cette méthode n'a aucun effet si la fenêtre en question est déjà visible. + + ref.show(); + + + * **Réf**: référence à la fenêtre () InAppBrowser`InAppBrowser`) + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Injecte du code JavaScript dans la fenêtre `InAppBrowser` + + ref.executeScript(details, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **injectDetails** : détails du script à exécuter, requérant une propriété `file` ou `code`. *(Object)* + + * **file** : URL du script à injecter. + * **code** : texte du script à injecter. + + * **callback** : une fonction exécutée après l'injection du code JavaScript. + + * Si le script injecté est de type `code`, un seul paramètre est transmis à la fonction callback, correspondant à la valeur de retour du script enveloppée dans un `Array`. Pour les scripts multilignes, il s'agit de la valeur renvoyée par la dernière instruction ou la dernière expression évaluée. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Bizarreries navigateur + + * clef de **code** uniquement est pris en charge. + +### Bizarreries de Windows + +En raison de la [documentation MSDN](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) le script appelé peut retourner uniquement les valeurs de chaîne, sinon le paramètre, passé au **rappel** sera `[null]`. + +## insertCSS + +> Injecte des règles CSS dans la fenêtre `InAppBrowser`. + + ref.insertCSS(details, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **injectDetails** : détails du script à exécuter, requérant une propriété `file` ou `code`. *(Object)* + + * **file** : URL de la feuille de style à injecter. + * **code** : contenu de la feuille de style à injecter. + + * **callback** : une fonction exécutée après l'injection du fichier CSS. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/doc/it/README.md b/doc/it/README.md new file mode 100644 index 000000000..4e06888ad --- /dev/null +++ b/doc/it/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Questo plugin fornisce una vista di browser web che viene visualizzato quando si chiama `di cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Il `cordova.InAppBrowser.open()` funzione è definita per essere un rimpiazzo per la funzione `window.open`. Esistenti chiamate `Window` possono utilizzare la finestra di InAppBrowser, sostituendo window.open(): + + window.open = cordova.InAppBrowser.open; + + +La finestra di InAppBrowser si comporta come un browser web standard e non può accedere a Cordova APIs. Per questo motivo, è consigliabile la InAppBrowser se è necessario caricare il contenuto (non attendibile) di terze parti, invece di caricamento che in webview Cordova principale. Il InAppBrowser non è soggetto alla whitelist, né sta aprendo il link nel browser di sistema. + +La InAppBrowser fornisce di default propri controlli GUI per l'utente (indietro, avanti, fatto). + +Per indietro la compatibilità, questo plugin ganci anche `window.open`. Tuttavia, il plugin installato gancio di `window.open` può avere effetti collaterali indesiderati (soprattutto se questo plugin è incluso solo come dipendenza di un altro plugin). Il gancio di `window. open` verrà rimosso in una futura release principale. Fino a quando il gancio è rimosso dal plugin, apps può ripristinare manualmente il comportamento predefinito: + + delete window.open // Reverts the call back to it's prototype's default + + +Sebbene `window.open` sia in ambito globale, InAppBrowser non è disponibile fino a dopo l'evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installazione + + cordova plugin add cordova-plugin-inappbrowser + + +Se si desidera che tutti i carichi di pagina nell'app di passare attraverso il InAppBrowser, si può semplicemente collegare `window.open` durante l'inizializzazione. Per esempio: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Apre un URL in una nuova istanza di `InAppBrowser`, l'istanza corrente del browser o il browser di sistema. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + + * **url**: l'URL da caricare *(String)*. Chiamare `encodeURI()` su questo, se l'URL contiene caratteri Unicode. + + * **target**: la destinazione in cui caricare l'URL, un parametro facoltativo che il valore predefinito è `_self` . *(String)* + + * `_self`: Si apre in Cordova WebView se l'URL è nella lista bianca, altrimenti si apre nella`InAppBrowser`. + * `_blank`: Apre il`InAppBrowser`. + * `_system`: Si apre nel browser web del sistema. + + * **options**: opzioni per il `InAppBrowser` . Opzionale, inadempiente a: `location=yes` . *(String)* + + Il `options` stringa non deve contenere alcun spazio vuoto, e coppie nome/valore ogni funzionalità devono essere separate da una virgola. Caratteristica nomi sono tra maiuscole e minuscole. Tutte le piattaforme supportano il valore riportato di seguito: + + * **posizione**: impostata su `yes` o `no` per trasformare il `InAppBrowser` di barra di posizione on o off. + + Solo su Android: + + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra + * **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra + * **zoom**: impostare su `yes` per mostrare i controlli di zoom del browser Android, impostata su `no` per nasconderli. Valore predefinito è `yes`. + * **hardwareback**: impostare `yes` per utilizzare il pulsante Indietro hardware per spostarsi all'indietro tra il `InAppBrowser`di storia. Se esiste una pagina precedente, si chiuderà il `InAppBrowser` . Il valore predefinito è `yes`, quindi è necessario impostare a `no` , se si desidera che il pulsante indietro per chiudere semplicemente il InAppBrowser. + + solo iOS: + + * **closebuttoncaption**: impostare una stringa da utilizzare come didascalia del pulsante **fatto** . Si noti che è necessario localizzare questo valore a te stesso. + * **disallowoverscroll**: impostare su `yes` o `no` (default è `no` ). Attiva/disattiva la proprietà UIWebViewBounce. + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra + * **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra + * **Toolbar**: impostare su `yes` o `no` per attivare la barra degli strumenti o disattivare per il InAppBrowser (default`yes`) + * **enableViewportScale**: impostare su `yes` o `no` per impedire la viewport ridimensionamento tramite un tag meta (default`no`). + * **mediaPlaybackRequiresUserAction**: impostare su `yes` o `no` per impedire HTML5 audio o video da AutoPlay (default`no`). + * **allowInlineMediaPlayback**: impostare su `yes` o `no` per consentire la riproduzione dei supporti HTML5 in linea, visualizzare all'interno della finestra del browser, piuttosto che un'interfaccia specifica del dispositivo di riproduzione. L'HTML `video` elemento deve includere anche il `webkit-playsinline` (default di attributo`no`) + * **keyboardDisplayRequiresUserAction**: impostare su `yes` o `no` per aprire la tastiera quando elementi form ricevano lo stato attivo tramite di JavaScript `focus()` chiamata (default`yes`). + * **suppressesIncrementalRendering**: impostare su `yes` o `no` aspettare fino a quando tutti i nuovi contenuti di vista viene ricevuto prima il rendering (default`no`). + * **presentationstyle**: impostare su `pagesheet` , `formsheet` o `fullscreen` per impostare lo [stile di presentazione](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (default`fullscreen`). + * **transitionstyle**: impostare su `fliphorizontal` , `crossdissolve` o `coververtical` per impostare lo [stile di transizione](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (default`coververtical`). + * **toolbarposition**: impostare su `top` o `bottom` (default è `bottom` ). Provoca la barra degli strumenti sia nella parte superiore o inferiore della finestra. + + Solo per Windows: + + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **fullscreen**: impostata su `yes` per creare il controllo browser senza un bordo attorno ad esso. Siete pregati di notare che se **location=no** viene specificato, non ci sarà nessun controllo presentato all'utente per chiudere la finestra IAB. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Esempio + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS stranezze + +Come plugin non imporre alcun disegno c'è bisogno di aggiungere alcune regole CSS se aperto con `target='_blank'`. Le regole potrebbero apparire come questi + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Stranezze di Windows + +Simile al comportamento visivo finestra di Firefox OS IAB può essere sottoposto a override tramite `inAppBrowserWrap`/ classi CSS`inAppBrowserWrapFullscreen` + +### Stranezze browser + + * Plugin viene implementato tramite iframe, + + * Cronologia di navigazione (pulsanti`indietro` e `Avanti` in LocationBar) non è implementato. + +## InAppBrowser + +L'oggetto restituito da una chiamata a `di cordova.InAppBrowser.open`. + +### Metodi + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> Aggiunge un listener per un evento dal`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + + * **EventName**: l'evento per l'ascolto *(String)* + + * **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL. + * **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL. + * **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore durante il caricamento di un URL. + * **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa. + + * **richiamata**: la funzione che viene eseguito quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto come parametro. + +### Proprietà InAppBrowserEvent + + * **tipo**: il eventname, o `loadstart` , `loadstop` , `loaderror` , o `exit` . *(String)* + + * **URL**: l'URL che è stato caricato. *(String)* + + * **codice**: il codice di errore, solo nel caso di `loaderror` . *(Numero)* + + * **messaggio**: il messaggio di errore, solo nel caso di `loaderror` . *(String)* + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Stranezze browser + +eventi `onloadstart` e `loaderror` non sono stati licenziati. + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Rimuove un listener per un evento dal`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + + * **EventName**: interrompere l'attesa per l'evento. *(String)* + + * **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL. + * **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL. + * **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore di caricamento di un URL. + * **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa. + + * **richiamata**: la funzione da eseguire quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Chiude la `InAppBrowser` finestra. + + ref.close(); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * Firefox OS + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Visualizza una finestra di InAppBrowser che è stato aperto nascosta. Questa chiamata non ha effetto se la InAppBrowser era già visibile. + + ref.show(); + + + * **Rif**: riferimento per il InAppBrowser finestra (`InAppBrowser`) + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Inserisce il codice JavaScript nella `InAppBrowser` finestra + + ref.executeScript(details, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + + * **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)* + + * **file**: URL dello script da iniettare. + * **codice**: testo dello script da iniettare. + + * **richiamata**: la funzione che viene eseguito dopo che il codice JavaScript viene iniettato. + + * Se lo script iniettato è di tipo `code` , il callback viene eseguita con un singolo parametro, che è il valore restituito del copione, avvolto in un `Array` . Per gli script multi-linea, questo è il valore restituito dell'ultima istruzione, o l'ultima espressione valutata. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Stranezze browser + + * è supportato solo il **code** chiave. + +### Stranezze di Windows + +A causa di [documenti MSDN](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) lo script richiamato può restituire solo i valori di stringa, altrimenti il parametro, passato al **callback** sarà `[null]`. + +## insertCSS + +> Inietta CSS nella `InAppBrowser` finestra. + + ref.insertCSS(details, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + + * **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)* + + * **file**: URL del foglio di stile per iniettare. + * **codice**: testo del foglio di stile per iniettare. + + * **richiamata**: la funzione che viene eseguito dopo che il CSS viene iniettato. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/doc/ja/README.md b/doc/ja/README.md new file mode 100644 index 000000000..40f631b7b --- /dev/null +++ b/doc/ja/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +このプラグインは `コルドバを呼び出すときに表示される web ブラウザーのビューを提供します。InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`コルドバ。InAppBrowser.open()` `window.open()` 関数との交換を定義する関数。 既存の `window.open()` 呼び出しは、window.open を置き換えることによって InAppBrowser ウィンドウを使用できます。 + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser ウィンドウは標準的な web ブラウザーのように動作し、コルドバ Api にアクセスできません。 この理由から、InAppBrowser お勧めする場合はメインのコルドバの webview を読み込むのではなくサード パーティ (信頼されていない) コンテンツをロードする必要があります。 InAppBrowser、ホワイト リストの対象ではないも、システムのブラウザーでリンクを開くです。 + +InAppBrowser を提供しますデフォルトで GUI コントロール (戻る、進む、行う)。 + +後方互換性、このプラグインは、また `window.open` をフックのため。 ただし、`window.open` のプラグイン インストール フックを持つことができます意図しない副作用 (特に場合は、このプラグインは別のプラグインの依存関係としてのみ含まれています)。 `window.open` のフックは、将来のメジャー リリースで削除されます。 プラグインから、フックが削除されるまでアプリはデフォルトの動作を手動で復元できます。 + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` はグローバル スコープでは、InAppBrowser は、`deviceready` イベントの後まで利用できません。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## インストール + + cordova plugin add cordova-plugin-inappbrowser + + +InAppBrowser を通過するアプリですべてのページの読み込みをする場合は初期化中に `window.open` を単にフックできます。たとえば。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +新しい `InAppBrowser` インスタンスを現在のブラウザー インスタンスまたはシステムのブラウザーで URL を開きます。 + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + + * **url**: *(文字列)*をロードする URL。電話 `encodeURI()` 場合は、この上の URL は Unicode 文字を含みます。 + + * **ターゲット**: ターゲット URL は、既定値は、省略可能なパラメーターをロードするを `_self` 。*(文字列)* + + * `_self`: コルドバ WebView URL がホワイト リストにある場合で開きます、それ以外の場合で開きます、`InAppBrowser`. + * `_blank`: で開きます、`InAppBrowser`. + * `_system`: システムの web ブラウザーで開きます。 + + * **オプション**: おぷしょん、 `InAppBrowser` 。省略可能にする: `location=yes` 。*(文字列)* + + `options`文字列にはする必要があります任意の空白スペースが含まれていないと、各機能の名前と値のペアをコンマで区切る必要があります。 機能名では大文字小文字を区別します。 以下の値をサポートするプラットフォーム。 + + * **場所**: に設定 `yes` または `no` を有効にする、 `InAppBrowser` の場所バー オンまたはオフにします。 + + アンドロイドのみ: + + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に + * **clearsessioncache**: に設定されている `yes` はセッション cookie のキャッシュをオフにすると、新しいウィンドウが開く前に + * **zoom**:`yes`Android ブラウザーのズーム コントロールの表示を`no`に設定すると、それらを非表示に設定します。 既定値は`yes`. + * **hardwareback**: `InAppBrowser`の履歴を後方に移動するのにハードウェアの戻るボタンを使用して`yes`に設定します。 前のページがない場合は、 `InAppBrowser`が終了します。 既定値は`はい`、ため場合は、単に、InAppBrowser を閉じる戻るボタン`なし`を設定する必要があります。 + + iOS のみ: + + * **closebuttoncaption**: [**完了**] ボタンのキャプションとして使用する文字列に設定します。自分でこの値をローカライズする必要があることに注意してください。 + * **disallowoverscroll**: に設定されている `yes` または `no` (既定値は `no` )。/UIWebViewBounce プロパティをオフにします。 + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に + * **clearsessioncache**: に設定されている `yes` はセッション cookie のキャッシュをオフにすると、新しいウィンドウが開く前に + * **ツールバー**: に設定されている `yes` または `no` InAppBrowser (デフォルトのツールバーのオンまたはオフを有効にするには`yes`) + * **enableViewportScale**: に設定されている `yes` または `no` を (デフォルトではメタタグを介してスケーリング ビューポートを防ぐために`no`). + * **mediaPlaybackRequiresUserAction**: に設定されている `yes` または `no` を HTML5 オーディオまたはビデオを自動再生 (初期設定から防ぐために`no`). + * **allowInlineMediaPlayback**: に設定されている `yes` または `no` ラインで HTML5 メディア再生には、デバイス固有再生インターフェイスではなく、ブラウザー ウィンドウ内に表示するようにします。 HTML の `video` 要素を含める必要がありますまた、 `webkit-playsinline` 属性 (デフォルトは`no`) + * **keyboardDisplayRequiresUserAction**: に設定されている `yes` または `no` をフォーム要素の JavaScript を介してフォーカスを受け取るときに、キーボードを開く `focus()` コール (デフォルトは`yes`). + * **suppressesIncrementalRendering**: に設定されている `yes` または `no` (デフォルトでは表示される前にビューのすべての新しいコンテンツを受信するまで待機するには`no`). + * **presentationstyle**: に設定されている `pagesheet` 、 `formsheet` または `fullscreen` (デフォルトでは、[プレゼンテーション スタイル](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle)を設定するには`fullscreen`). + * **transitionstyle**: に設定されている `fliphorizontal` 、 `crossdissolve` または `coververtical` (デフォルトでは、[トランジションのスタイル](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle)を設定するには`coververtical`). + * **toolbarposition**: に設定されている `top` または `bottom` (既定値は `bottom` )。上部またはウィンドウの下部にツールバーが発生します。 + + Windows のみ: + + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **fullscreen**: 周りに境界線なしブラウザー コントロールを作成する`[yes]`に設定します。 その場合に注意してください**location=no**指定また、IAB ウィンドウを閉じるためにユーザーに提示はコントロールされます。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * ブラックベリー 10 + * Firefox の OS + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### 例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS 癖 + +開かれた場合にいくつかの CSS ルールを追加する必要があるプラグインは任意のデザインを適用しないと `target ='_blank'`。これらのような規則になります。 + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows の癖 + +`InAppBrowserWrap`経由で Firefox OS IAB ウィンドウの視覚的動作に似ていますをオーバーライドできます/`inAppBrowserWrapFullscreen` CSS クラス + +### ブラウザーの癖 + + * Iframe を介してプラグインを実装します。 + + * ナビゲーション履歴 (LocationBar の`進む`と`戻る`ボタン) は実装されていません。 + +## InAppBrowser + +`コルドバへの呼び出しから返されるオブジェクト。InAppBrowser.open`. + +### メソッド + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> イベントのリスナーを追加します、`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + + * **eventname**: *(文字列)*をリッスンするイベント + + * ****: イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。 + * **loadstop**: イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。 + * **loaderror**: イベントが発生するとき、 `InAppBrowser` URL の読み込みでエラーが発生します。 + * **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。 + + * **コールバック**: イベントが発生したときに実行される関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクトをパラメーターとして。 + +### InAppBrowserEvent プロパティ + + * **タイプ**: eventname どちらか `loadstart` 、 `loadstop` 、 `loaderror` 、または `exit` 。*(文字列)* + + * **url**: URL が読み込まれました。*(文字列)* + + * **コード**: の場合にのみ、エラー コード `loaderror` 。*(数)* + + * **メッセージ**: の場合にのみ、エラー メッセージ `loaderror` 。*(文字列)* + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### ブラウザーの癖 + +`loadstart` `loaderror`イベントが発生していません。 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> イベントのリスナーを削除します、`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + + * **eventname**: イベントのリッスンを停止します。*(文字列)* + + * ****: イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。 + * **loadstop**: イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。 + * **loaderror**: イベントが発生するとき、 `InAppBrowser` URL の読み込みエラーが発生します。 + * **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。 + + * **コールバック**: イベントが発生するときに実行する関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクト。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 閉じる、 `InAppBrowser` ウィンドウ。 + + ref.close(); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * Firefox の OS + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 隠された開かれた InAppBrowser ウィンドウが表示されます。この関数を呼び出すは影響しません、InAppBrowser が既に表示されている場合。 + + ref.show(); + + + * **ref**: InAppBrowser ウィンドウ (への参照`InAppBrowser`) + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> JavaScript コードに挿入します、 `InAppBrowser` ウィンドウ + + ref.executeScript(details, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + + * **injectDetails**: 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)* + + * **ファイル**: スクリプトの URL を注入します。 + * **コード**: スクリプトのテキストを挿入します。 + + * **コールバック**: JavaScript コードを注入した後に実行される関数。 + + * 挿入されたスクリプトが型の場合 `code` 、スクリプトの戻り値は、1 つのパラメーターでコールバックを実行するのに包まれて、 `Array` 。 マルチライン スクリプトについては、最後のステートメントでは、または評価した最後の式の戻り値です。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### ブラウザーの癖 + + * **code**キーのみをサポートします。 + +### Windows の癖 + +[MSDN ドキュメント](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx)のため呼び出されたスクリプト パラメーターを返す文字列値のみそれ以外の場合は、**コールバック**に渡される`[null]`になります. + +## insertCSS + +> CSS に注入する、 `InAppBrowser` ウィンドウ。 + + ref.insertCSS(details, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + + * **injectDetails**: 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)* + + * **ファイル**: 注入するスタイル シートの URL。 + * **コード**: 注入するスタイル シートのテキスト。 + + * **コールバック**: CSS の注入後に実行される関数。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/doc/ko/README.md b/doc/ko/README.md new file mode 100644 index 000000000..13511ad86 --- /dev/null +++ b/doc/ko/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +이 플러그인 `코르도바를 호출할 때 표시 하는 웹 브라우저 보기를 제공 합니다.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`코르도바입니다.InAppBrowser.open()` 함수 `window.open ()` 함수에 대 한 대체품 정의 됩니다. 기존의 `window.open ()` 호출 window.open을 대체 하 여 InAppBrowser 윈도우를 사용할 수 있습니다. + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser 창 표준 웹 브라우저 처럼 동작 및 코르도바 Api에 액세스할 수 없습니다. 이 이유는 InAppBrowser는 것이 좋습니다는 주요 코르도바 webview로 로드 하는 대신 제 3 자 (신뢰할 수 없는) 콘텐츠를 로드 해야 할 경우. InAppBrowser는 허용 될 수도 시스템 브라우저에서 링크를 여는. + +사용자에 대 한 자체 GUI 컨트롤에서 기본적으로 제공 된 InAppBrowser (뒤로, 앞으로, 완료). + +대 한 뒤 호환성,이 플러그인도 `window.open` 후크. 그러나, `window.open`의 플러그인 설치 후크를 가질 수 있습니다 의도 하지 않은 부작용 (특히 경우이 플러그인이 다른 플러그인 종속성 으로만 포함). `window.open` 후크 주요 릴리스에서 제거 됩니다. 후크 플러그인에서 제거 될 때까지 애플 리 케이 션 수 있습니다 수동으로 기본 동작을 복원 하 게 됩니다. + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` 전역 범위에 있지만 InAppBrowser 제공 되지 않습니다 때까지 `deviceready` 이벤트 후. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## 설치 + + cordova plugin add cordova-plugin-inappbrowser + + +InAppBrowser를 통해가 서 당신의 애플 리 케이 션에서 모든 페이지를 로드 하려는 경우 초기화 하는 동안 `window.open` 간단 하 게 연결할 수 있습니다. 예를 들어: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +새 `InAppBrowser` 인스턴스, 현재 브라우저 인스턴스 또는 시스템 브라우저에서 URL을 엽니다. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + + * **url**: *(문자열)를*로드 하는 URL. 전화 `encodeURI()` 이 경우에는 URL 유니코드 문자를 포함 합니다. + + * **대상**: 대상 URL, 기본적으로 선택적 매개 변수를 로드 하는 `_self` . *(문자열)* + + * `_self`: URL 화이트 리스트에 있으면 코르도바 WebView에서 열리고, 그렇지 않으면 열에`InAppBrowser`. + * `_blank`: 준공에`InAppBrowser`. + * `_system`: 시스템의 웹 브라우저에서 엽니다. + + * **옵션**: 옵션은 `InAppBrowser` . 선택적, 디폴트에: `location=yes` . *(문자열)* + + `options`문자열 텅 빈 어떤 스페이스 포함 해서는 안 그리고 쉼표 각 기능의 이름/값 쌍을 구분 합니다. 기능 이름은 대/소문자입니다. 모든 플랫폼 지원 아래 값: + + * **위치**: 설정 `yes` 또는 `no` 설정 하는 `InAppBrowser` 의 위치 표시줄 켜거나 끕니다. + + 안 드 로이드만: + + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **clearcache**: 설정 `yes` 브라우저를 쿠키 캐시 삭제 하기 전에 새 창이 열립니다 + * **clearsessioncache**: 설정 `yes` 세션 쿠키 캐시를 삭제 하기 전에 새 창이 열립니다 + * **zoom/축소**: `네` 안 드 로이드 브라우저의 확대/축소 컨트롤을 표시, 그들을 숨길 수 `없는` 로 설정으로 설정. 기본값은 `네`. + * **hardwareback**: 하드웨어 뒤로 버튼을 사용 하 여 `InAppBrowser`의 역사를 통해 뒤로 이동 하려면 `예` 로 설정. 이전 페이지 없음이 있는 경우에, `InAppBrowser` 닫힙니다. 기본 값 이므로 `yes`, 뒤로 버튼을 간단 하 게는 InAppBrowser를 하려면 `no` 로 설정 해야 합니다. + + iOS만: + + * **closebuttoncaption**: **수행** 하는 단추의 캡션으로 사용할 문자열을 설정 합니다. 참고 직접이 값을 지역화 해야 합니다. + * **disallowoverscroll**: 설정 `yes` 또는 `no` (기본값은 `no` ). 회전 온/오프 UIWebViewBounce 속성입니다. + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **clearcache**: 설정 `yes` 브라우저를 쿠키 캐시 삭제 하기 전에 새 창이 열립니다 + * **clearsessioncache**: 설정 `yes` 세션 쿠키 캐시를 삭제 하기 전에 새 창이 열립니다 + * **도구 모음**: 설정 `yes` 또는 `no` InAppBrowser (기본값:에 대 한 도구 모음 온 / 오프를 돌기 위하여`yes`) + * **enableViewportScale**: 설정 `yes` 또는 `no` 뷰포트 메타 태그 (기본값:를 통해 확장을 방지 하기 위해`no`). + * **mediaPlaybackRequiresUserAction**: 설정 `yes` 또는 `no` HTML5 오디오 또는 비디오 자동 재생 (기본값에서에서 방지 하기 위해`no`). + * **allowInlineMediaPlayback**: 설정 `yes` 또는 `no` 인라인 HTML5 미디어 재생, 장치 전용 재생 인터페이스 보다는 브라우저 창 내에서 표시할 수 있도록 합니다. HTML의 `video` 요소가 포함 되어야 합니다는 `webkit-playsinline` 특성 (기본값:`no`) + * **keyboardDisplayRequiresUserAction**: 설정 `yes` 또는 `no` 양식 요소는 자바 스크립트를 통해 포커스를 받을 때 키보드를 열고 `focus()` 전화 (기본값:`yes`). + * **suppressesIncrementalRendering**: 설정 `yes` 또는 `no` (기본값을 렌더링 하기 전에 모든 새로운 보기 콘텐츠를 받을 때까지 기다려야`no`). + * **presentationstyle**: 설정 `pagesheet` , `formsheet` 또는 `fullscreen` [프레 젠 테이 션 스타일](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (기본값을 설정 하려면`fullscreen`). + * **transitionstyle**: 설정 `fliphorizontal` , `crossdissolve` 또는 `coververtical` [전환 스타일](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (기본값을 설정 하려면`coververtical`). + * **toolbarposition**: 설정 `top` 또는 `bottom` (기본값은 `bottom` ). 위쪽 또는 아래쪽 창에 도구 모음을 발생 합니다. + + Windows에만 해당: + + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **fullscreen**: 주위 테두리 없이 브라우저 컨트롤을 만드는 `yes` 를 설정. 참고로 만약 **location=no** 지정, 통제 내 사 창 닫기를 사용자에 게 표시 될 것입니다. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * 블랙베리 10 + * Firefox 운영 체제 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 예를 들어 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### 파이어 폭스 OS 단점 + +플러그인 어떤 디자인을 적용 하지 않는 경우 열 일부 CSS의 규칙을 추가할 필요가 있다 `target='_blank'`. 이 같이 규칙 + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### 윈도우 특수 + +파이어 폭스 OS 내 사 창 시각적 행동 비슷한 `inAppBrowserWrap`통해 재정의할 수 /`inAppBrowserWrapFullscreen` CSS 클래스 + +### 브라우저 만지면 + + * 플러그인은 iframe을 통해 구현 + + * 탐색 기록 (LocationBar에서`뒤로` 및 `앞으로` 단추)은 구현 되지 않습니다. + +## InAppBrowser + +`Cordova에 대 한 호출에서 반환 하는 개체.InAppBrowser.open`. + +### 메서드 + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> 이벤트에 대 한 수신기를 추가 합니다`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + + * **eventname**: *(문자열)를* 수신 하도록 이벤트 + + * **loadstart**: 이벤트 발생 때는 `InAppBrowser` URL 로드를 시작 합니다. + * **loadstop**: 이벤트가 발생 시기는 `InAppBrowser` URL 로드 완료. + * **loaderror**: 이벤트 발생 때는 `InAppBrowser` URL을 로드할 때 오류가 발생 합니다. + * **종료**: 이벤트가 발생 시기는 `InAppBrowser` 창이 닫힙니다. + + * **콜백**: 이벤트가 발생 될 때 실행 되는 함수. 함수는 전달 된 `InAppBrowserEvent` 개체를 매개 변수로 합니다. + +### InAppBrowserEvent 속성 + + * **유형**: eventname, 중 `loadstart` , `loadstop` , `loaderror` , 또는 `exit` . *(문자열)* + + * **url**: URL 로드 된. *(문자열)* + + * **코드**: 오류 코드의 경우에만 `loaderror` . *(수)* + + * **메시지**: 오류 메시지의 경우에만 `loaderror` . *(문자열)* + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 브라우저 만지면 + +`loadstart` 및 `loaderror` 이벤트 해 고는 되 고. + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> 이벤트에 대 한 수신기를 제거 합니다`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + + * **eventname**: 이벤트 수신 대기를 중지 합니다. *(문자열)* + + * **loadstart**: 이벤트 발생 때는 `InAppBrowser` URL 로드를 시작 합니다. + * **loadstop**: 이벤트가 발생 시기는 `InAppBrowser` URL 로드 완료. + * **loaderror**: 이벤트 발생 때는 `InAppBrowser` URL 로드 오류가 발생 합니다. + * **종료**: 이벤트가 발생 시기는 `InAppBrowser` 창이 닫힙니다. + + * **콜백**: 이벤트가 발생 하면 실행할 함수. 함수는 전달 된 `InAppBrowserEvent` 개체. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 종료는 `InAppBrowser` 창. + + ref.close(); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * Firefox 운영 체제 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 숨겨진 열은 한 InAppBrowser 창을 표시 합니다. 전화는 InAppBrowser가 이미 보이는 경우는 효과가 없습니다. + + ref.show(); + + + * **ref**: InAppBrowser 창 (참조`InAppBrowser`) + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> 에 자바 스크립트 코드를 삽입는 `InAppBrowser` 창 + + ref.executeScript(details, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + + * **injectDetails**: 스크립트 실행의 세부 사항 중 하나를 지정 하는 `file` 또는 `code` 키. *(개체)* + + * **파일**: 삽입 하는 스크립트의 URL. + * **코드**: 스크립트 텍스트를 삽입 합니다. + + * **콜백**: 자바 스크립트 코드를 주입 후 실행 기능. + + * 삽입 된 스크립트 유형의 경우 `code` , 스크립트의 반환 값은 단일 매개 변수는 콜백 실행에 싸여 있는 `Array` . 여러 줄 스크립트에 대 한 마지막 문 또는 평가 마지막 식의 반환 값입니다. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### 브라우저 만지면 + + * **code** 키만 지원 됩니다. + +### 윈도우 특수 + +[MSDN 문서](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) 인해 호출된 스크립트 반환할 수 있습니다 문자열 값만 그렇지 않으면 매개 변수, **콜백** 전달 `[null]` 될 것입니다.. + +## insertCSS + +> 주사로 CSS는 `InAppBrowser` 창. + + ref.insertCSS(details, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + + * **injectDetails**: 스크립트 실행의 세부 사항 중 하나를 지정 하는 `file` 또는 `code` 키. *(개체)* + + * **파일**: 삽입 하는 스타일 시트의 URL. + * **코드**: 삽입 하는 스타일 시트의 텍스트. + + * **콜백**: CSS 주입 후 실행 기능. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/doc/pl/README.md b/doc/pl/README.md new file mode 100644 index 000000000..5ff58adab --- /dev/null +++ b/doc/pl/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Plugin daje widok przeglądarki sieci web, które są wyświetlane podczas wywoływania `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`cordova.InAppBrowser.open()` funkcja jest definiowana jako zamiennik dla funkcji `window.open()`. Istniejące wywołania `window.open()` służy okno InAppBrowser, zastępując window.open: + + window.open = cordova.InAppBrowser.open; + + +Okna InAppBrowser zachowuje się jak standardowe przeglądarki i nie ma dostępu do API Cordova. Z tego powodu zaleca się InAppBrowser jeśli ty potrzebować wobec ciężar (niezaufanej) treści osób trzecich, a nie że wczytywanie głównym webview Cordova. InAppBrowser nie jest biała, ani nie jest otwieranie linków w przeglądarce systemu. + +InAppBrowser zawiera domyślnie kontrole GUI dla użytkownika (tył, przód, zrobić). + +Do tyłu zgodności, ten plugin również haki `window.open`. Jednak może mieć zainstalowane wtyczki haka `window.open` niezamierzone skutki uboczne (zwłaszcza, jeśli ten plugin jest włączone tylko jako część innej wtyczki). Hak `window.open` zostaną usunięte w przyszłej wersji głównych. Dopóki hak jest usuwany z wtyczki, aplikacje można ręcznie przywrócić domyślne zachowanie: + + delete window.open // Reverts the call back to it's prototype's default + + +Chociaż `window.open` w globalnym zasięgu, InAppBrowser nie jest dostępne dopiero po zdarzeniu `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Instalacja + + cordova plugin add cordova-plugin-inappbrowser + + +Jeśli chcesz wszystko stronica ładunki w swojej aplikacji, aby przejść przez InAppBrowser, można po prostu podłączyć `window.open` podczas inicjowania. Na przykład: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Otwiera URL w nowe wystąpienie `InAppBrowser`, bieżące wystąpienie przeglądarki lub przeglądarki systemu. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + + * **adres**: adres URL do ładowania *(ciąg)*. Wywołanie `encodeURI()` na to, czy adres URL zawiera znaki Unicode. + + * **miejsce docelowe**: miejsce docelowe, w którym wobec ciężar ten URL parametr opcjonalny, który domyślnie `_self` . *(String)* + + * `_self`: Otwiera w Cordova WebView, jeśli adres URL jest na białej liście, inaczej ono otwiera w`InAppBrowser`. + * `_blank`: Otwiera w`InAppBrowser`. + * `_system`: Otwiera w przeglądarce internetowej systemu. + + * **Opcje**: opcje dla `InAppBrowser` . Opcjonalnie, nie stawiła się: `location=yes` . *(String)* + + `options`Ciąg nie może zawierać żadnych spacji, i pary nazwa/wartość każdej funkcji muszą być oddzielone przecinkami. Nazwy funkcji jest rozróżniana. Wszystkich platform obsługuje wartości poniżej: + + * **Lokalizacja**: zestaw `yes` lub `no` Aby włączyć `InAppBrowser` na pasek lub wyłączyć. + + Android: + + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **ClearCache**: zestaw `yes` do przeglądarki w pamięci podręcznej plików cookie wyczyszczone zanim otworzy się nowe okno + * **clearsessioncache**: zestaw `yes` mieć w pamięci podręcznej plików cookie sesji wyczyszczone zanim otworzy się nowe okno + * **zoom**: `yes` aby pokazać formantami powiększania Android przeglądarka, ustawiona na `nie` aby je ukryć. Wartość domyślna to `tak`. + * **hardwareback**: zestaw do `yes` , aby użyć przycisk Wstecz sprzętu do nawigacji wstecz historii `InAppBrowser`. Jeśli nie ma żadnej poprzedniej strony, `InAppBrowser` zostanie zamknięta. Wartością domyślną jest `yes`, więc należy ustawić ją na `no` jeśli chcesz przycisk Wstecz, aby po prostu zamknąć InAppBrowser. + + tylko iOS: + + * **closebuttoncaption**: aby użyć jak **zrobić** przycisk Podpis ustawiona na ciąg. Należy pamiętać, że trzeba zlokalizować tę wartość siebie. + * **disallowoverscroll**: zestaw `yes` lub `no` (domyślnie `no` ). Włącza/wyłącza właściwość UIWebViewBounce. + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **ClearCache**: zestaw `yes` do przeglądarki w pamięci podręcznej plików cookie wyczyszczone zanim otworzy się nowe okno + * **clearsessioncache**: zestaw `yes` mieć w pamięci podręcznej plików cookie sesji wyczyszczone zanim otworzy się nowe okno + * **pasek narzędzi**: zestaw `yes` lub `no` Aby włączyć pasek narzędzi lub wyłączyć dla InAppBrowser (domyślnie`yes`) + * **enableViewportScale**: zestaw `yes` lub `no` Aby zapobiec rzutni skalowanie za pomocą tagu meta (domyślnie`no`). + * **mediaPlaybackRequiresUserAction**: zestaw `yes` lub `no` Aby zapobiec HTML5 audio lub wideo z Autoodtwarzanie (domyślnie`no`). + * **allowInlineMediaPlayback**: zestaw `yes` lub `no` Aby w linii HTML5 odtwarzanie, wyświetlanie w oknie przeglądarki, a nie interfejs odtwarzanie specyficzne dla urządzenia. HTML `video` również musi zawierać element `webkit-playsinline` atrybut (domyślnie`no`) + * **keyboardDisplayRequiresUserAction**: zestaw `yes` lub `no` Aby otworzyć klawiaturę ekranową, gdy elementy formularza ostrości za pomocą JavaScript `focus()` połączenia (domyślnie`yes`). + * **suppressesIncrementalRendering**: zestaw `yes` lub `no` czekać, aż wszystkie nowe widok zawartości jest otrzymane przed renderowany (domyślnie`no`). + * **presentationstyle**: zestaw `pagesheet` , `formsheet` lub `fullscreen` Aby ustawić [styl prezentacji](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (domyślnie`fullscreen`). + * **transitionstyle**: zestaw `fliphorizontal` , `crossdissolve` lub `coververtical` Aby ustawić [styl przejścia](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (domyślnie`coververtical`). + * **toolbarposition**: zestaw `top` lub `bottom` (domyślnie `bottom` ). Powoduje, że pasek ma być na górze lub na dole okna. + + Windows tylko: + + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **fullscreen**: zestaw do `yes` , aby utworzyć formant przeglądarki bez obramowania wokół niego. Należy pamiętać, że jeśli **location=no** również jest określony, nie będzie żadnej kontroli przedstawione do użytkownika, aby zamknąć okno IAB. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS dziwactwa + +Jak plugin nie wymuszać każdy projekt to trzeba dodać pewne reguły CSS jeśli otwarty z `target = "_blank"`. Zasady może wyglądać jak te + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows dziwactwa + +Podobne do Firefox OS IAB okno wizualne zachowanie może być zastąpiona przez `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` klas CSS + +### Quirks przeglądarki + + * Plugin jest realizowane za pośrednictwem iframe, + + * Historia nawigacji (przyciski`wstecz` i `do przodu` w LocationBar) nie jest zaimplementowana. + +## InAppBrowser + +Obiekt zwrócony z wywołania `cordova.InAppBrowser.open`. + +### Metody + + * metody addEventListener + * removeEventListener + * Zamknij + * Pokaż + * executeScript + * insertCSS + +## metody addEventListener + +> Dodaje detektor zdarzenia z`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + + * **EventName**: zdarzenie słuchać *(String)* + + * **loadstart**: zdarzenie gdy odpalam `InAppBrowser` zaczyna się ładować adresu URL. + * **loadstop**: zdarzenie gdy odpalam `InAppBrowser` zakończeniu ładowania adresu URL. + * **LoadError**: zdarzenie odpala gdy `InAppBrowser` napotka błąd podczas ładowania adresu URL. + * **wyjście**: zdarzenie gdy odpalam `InAppBrowser` okno jest zamknięte. + + * **wywołania zwrotnego**: funkcja, która wykonuje, gdy zdarzenie. Funkcja jest przekazywany `InAppBrowserEvent` obiektu jako parametr. + +### Właściwości InAppBrowserEvent + + * **Typ**: eventname, albo `loadstart` , `loadstop` , `loaderror` , lub `exit` . *(String)* + + * **adres**: adres URL, który został załadowany. *(String)* + + * **Kod**: kod błędu, tylko w przypadku `loaderror` . *(Liczba)* + + * **wiadomość**: komunikat o błędzie, tylko w przypadku `loaderror` . *(String)* + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Quirks przeglądarki + +wydarzenia `loadstart` i `loaderror` nie są być opalane. + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Usuwa detektor zdarzenia z`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + + * **EventName**: zdarzenie przestanie słuchać. *(String)* + + * **loadstart**: zdarzenie gdy odpalam `InAppBrowser` zaczyna się ładować adresu URL. + * **loadstop**: zdarzenie gdy odpalam `InAppBrowser` zakończeniu ładowania adresu URL. + * **LoadError**: zdarzenie odpala gdy `InAppBrowser` napotka błąd ładowania adresu URL. + * **wyjście**: zdarzenie gdy odpalam `InAppBrowser` okno jest zamknięte. + + * **wywołania zwrotnego**: funkcja do wykonania, gdy zdarzenie. Funkcja jest przekazywany `InAppBrowserEvent` obiektu. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## Zamknij + +> Zamyka `InAppBrowser` okna. + + ref.close(); + + + * **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * Firefox OS + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## Pokaż + +> Wyświetla InAppBrowser okno, który został otwarty ukryte. Zawód ten jest ignorowany, jeśli InAppBrowser już był widoczny. + + ref.show(); + + + * **ref**: odwołanie do InAppBrowser (okno`InAppBrowser`) + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Wstrzykuje kod JavaScript w `InAppBrowser` okna + + ref.executeScript(details, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + + * **injectDetails**: Szczegóły dotyczące skryptu, określając albo `file` lub `code` klucz. *(Obiekt)* + + * **plik**: adres URL skryptu, aby wstrzyknąć. + * **Kod**: tekst skryptu, aby wstrzyknąć. + + * **wywołania zwrotnego**: funkcja, która wykonuje po kod JavaScript jest wstrzykiwany. + + * Jeśli taki skrypt jest typu `code` , wykonuje wywołanie zwrotne z pojedynczym parametrem, który jest wartość zwracana przez skrypt, owinięte w `Array` . Dla wielu linii skrypty to wartość zwracana ostatniej instrukcja, lub ostatni wyrażenie oceniane. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Quirks przeglądarki + + * obsługiwany jest tylko **code** klucza. + +### Windows dziwactwa + +Ze względu na [MSDN dokumenty](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) wywołany skrypt może zwracać tylko wartości ciągów, inaczej parametr, przekazywany do **wywołania zwrotnego** będzie `[null]`. + +## insertCSS + +> Wstrzykuje CSS w `InAppBrowser` okna. + + ref.insertCSS(details, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + + * **injectDetails**: Szczegóły dotyczące skryptu, określając albo `file` lub `code` klucz. *(Obiekt)* + + * **plik**: URL arkusza stylów do wsuwania. + * **Kod**: tekst z arkusza stylów do wstrzykiwania. + + * **wywołania zwrotnego**: funkcja, która wykonuje po CSS jest wstrzykiwany. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/doc/zh/README.md b/doc/zh/README.md new file mode 100644 index 000000000..7d33d89c8 --- /dev/null +++ b/doc/zh/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +這個外掛程式提供了一個 web 瀏覽器視圖,顯示在調用 `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`cordova.InAppBrowser.open()` 函數被定義為一個臨時替代 `window.open ()` 函數。 現有 `window.open ()` 調用,可以通過替換 window.open 使用 InAppBrowser 視窗: + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser 視窗像一個標準的 web 瀏覽器中,並且無法訪問科爾多瓦 Api。 為此,建議 InAppBrowser 如果您需要載入協力廠商 (不可信) 的內容,而不是載入,進入主要的科爾多瓦 web 視圖。 InAppBrowser 是不受白名單中,也不在系統瀏覽器中打開的連結。 + +InAppBrowser 預設情況下它自己的 GUI 控制項為使用者提供 (後退、 前進、 完成)。 + +為向後相容性,此外掛程式還鉤 `window.open`。 然而,`window.open` 外掛程式安裝鉤子可以有副作用 (尤其是如果這個外掛程式是只列為另一個外掛程式的依賴項)。 在未來的主要發行版本中,將刪除 `window.open` 鉤。 一直至從該外掛程式鉤子後,應用程式可以手動還原預設行為: + + delete window.open // Reverts the call back to it's prototype's default + + +雖然 `window.open` 在全球範圍內,InAppBrowser 不可用直到 `deviceready` 事件之後。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## 安裝 + + cordova plugin add cordova-plugin-inappbrowser + + +如果您希望所有頁面載入中您的應用程式要通過 InAppBrowser,你可以簡單地在初始化過程中鉤 `window.open`。舉個例子: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +在新的 `InAppBrowser` 實例,當前的瀏覽器實例或系統瀏覽器中打開的 URL。 + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + + * **url**: 要載入*(字串)*的 URL。調用 `encodeURI()` 這個如果 URL 包含 Unicode 字元。 + + * **target**: 目標在其中載入的 URL,可選參數,預設值為 `_self` 。*(字串)* + + * `_self`: 打開在科爾多瓦 web 視圖如果 URL 是在白名單中,否則它在打開`InAppBrowser`. + * `_blank`: 在打開`InAppBrowser`. + * `_system`: 在該系統的 web 瀏覽器中打開。 + + * **options**: 選項為 `InAppBrowser` 。可選,拖欠到: `location=yes` 。*(字串)* + + `options`字串必須不包含任何空白的空間,和必須用逗號分隔每個功能的名稱/值對。 功能名稱區分大小寫。 所有平臺都支援下面的值: + + * **location**: 設置為 `yes` 或 `no` ,打開 `InAppBrowser` 的位置欄打開或關閉。 + + Android 系統只有: + + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **clearcache**: 將設置為 `yes` 有瀏覽器的 cookie 清除緩存之前打開新視窗 + * **clearsessioncache**: 將設置為 `yes` 有會話 cookie 緩存清除之前打開新視窗 + * **zoom**: 設置為`yes`,顯示 Android 瀏覽器的縮放控制項,設置為`no`,以隱藏它們。 `預設值是`. + * **hardwareback**: 設置為`yes`要使用硬體後退按鈕通過`InAppBrowser`的歷史向後導航。 如果沒有前一頁, `InAppBrowser`將會關閉。 預設值是的`yes`所以你必須將其設置為`no`,如果你想要的後退按鈕,只需關閉 InAppBrowser。 + + 只有 iOS: + + * **closebuttoncaption**: 設置為一個字串,以用作**做**按鈕的標題。請注意您需要對此值進行當地語系化你自己。 + * **disallowoverscroll**: 將設置為 `yes` 或 `no` (預設值是 `no` )。打開/關閉的 UIWebViewBounce 屬性。 + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **clearcache**: 將設置為 `yes` 有瀏覽器的 cookie 清除緩存之前打開新視窗 + * **clearsessioncache**: 將設置為 `yes` 有會話 cookie 緩存清除之前打開新視窗 + * **toolbar**: 設置為 `yes` 或 `no` ,為 InAppBrowser (預設為打開或關閉工具列`yes`) + * **enableViewportScale**: 將設置為 `yes` 或 `no` ,防止通過 meta 標記 (預設為縮放的視區`no`). + * **mediaPlaybackRequiresUserAction**: 將設置為 `yes` 或 `no` ,防止 HTML5 音訊或視頻從 autoplaying (預設為`no`). + * **allowInlineMediaPlayback**: 將設置為 `yes` 或 `no` ,讓線在 HTML5 播放媒體,在瀏覽器視窗中,而不是特定于設備播放介面內顯示。 HTML 的 `video` 元素還必須包括 `webkit-playsinline` 屬性 (預設為`no`) + * **keyboardDisplayRequiresUserAction**: 將設置為 `yes` 或 `no` 時,要打開鍵盤表單元素接收焦點通過 JavaScript 的 `focus()` 調用 (預設為`yes`). + * **suppressesIncrementalRendering**: 將設置為 `yes` 或 `no` 等待,直到所有新查看的內容正在呈現 (預設為前收到`no`). + * **presentationstyle**: 將設置為 `pagesheet` , `formsheet` 或 `fullscreen` 來設置[演示文稿樣式](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle)(預設為`fullscreen`). + * **transitionstyle**: 將設置為 `fliphorizontal` , `crossdissolve` 或 `coververtical` 設置[過渡樣式](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle)(預設為`coververtical`). + * **toolbarposition**: 將設置為 `top` 或 `bottom` (預設值是 `bottom` )。使工具列,則在頂部或底部的視窗。 + + 僅限 Windows: + + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **fullscreen**: 設置為`yes`,以創建無邊框的瀏覽器控制項。 請注意,如果**location=no**同時指定,則將呈現給使用者到密切 IAB 視窗沒有控制。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * 黑莓 10 + * 火狐瀏覽器作業系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### 火狐瀏覽器作業系統的怪癖 + +外掛程式不會強制任何設計是需要添加一些 CSS 規則,如果打開與 `target=_blank`。規則 》 可能看起來像這些 + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows 的怪癖 + +類似于 Firefox OS IAB 視窗視覺行為可以重寫通過`inAppBrowserWrap`/`inAppBrowserWrapFullscreen`的 CSS 類 + +### 瀏覽器的怪癖 + + * 外掛程式是通過 iframe,執行 + + * 未實現導航歷史記錄 (在 LocationBar 的`回顧`與`展望`按鈕)。 + +## InAppBrowser + +對 `科爾多瓦的調用返回的物件。InAppBrowser.open`. + +### 方法 + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> 為事件添加一個攔截器`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + + * **eventname**: 事件偵聽*(字串)* + + * **loadstart**: 當觸發事件 `InAppBrowser` 開始載入一個 URL。 + * **loadstop**: 當觸發事件 `InAppBrowser` 完成載入一個 URL。 + * **loaderror**: 當觸發事件 `InAppBrowser` 載入 URL 時遇到錯誤。 + * **exit**: 當觸發事件 `InAppBrowser` 關閉視窗。 + + * **callback**: 執行時觸發該事件的函數。該函數通過 `InAppBrowserEvent` 物件作為參數。 + +### InAppBrowserEvent 屬性 + + * **type**: eventname,或者 `loadstart` , `loadstop` , `loaderror` ,或 `exit` 。*(字串)* + + * **url**: 已載入的 URL。*(字串)* + + * **code**: 僅中的情況的錯誤代碼 `loaderror` 。*(人數)* + + * **message**: 該錯誤訊息,只有在的情況下 `loaderror` 。*(字串)* + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 瀏覽器的怪癖 + +`loadstart`和`loaderror`的事件不會被觸發。 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> 移除的事件攔截器`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + + * **eventname**: 要停止偵聽的事件。*(字串)* + + * **loadstart**: 當觸發事件 `InAppBrowser` 開始載入一個 URL。 + * **loadstop**: 當觸發事件 `InAppBrowser` 完成載入一個 URL。 + * **loaderror**: 當觸發事件 `InAppBrowser` 遇到錯誤載入一個 URL。 + * **exit**: 當觸發事件 `InAppBrowser` 關閉視窗。 + + * **callback**: 要在事件觸發時執行的函數。該函數通過 `InAppBrowserEvent` 物件。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 關閉 `InAppBrowser` 視窗。 + + ref.close(); + + + * **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * 火狐瀏覽器作業系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 顯示打開了隱藏的 InAppBrowser 視窗。調用這沒有任何影響,如果 InAppBrowser 是已經可見。 + + ref.show(); + + + * **ref**: InAppBrowser 視窗 (參考`InAppBrowser`) + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> 注入到 JavaScript 代碼 `InAppBrowser` 視窗 + + ref.executeScript(details, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + + * **injectDetails**: 要運行的腳本的詳細資訊或指定 `file` 或 `code` 的關鍵。*(物件)* + + * **檔**: 腳本的 URL 來注入。 + * **代碼**: 要注入腳本的文本。 + + * **回檔**: 執行後注入的 JavaScript 代碼的函數。 + + * 如果插入的腳本的類型 `code` ,回檔執行使用單個參數,這是該腳本的傳回值,裹在 `Array` 。 對於多行腳本,這是最後一條語句或最後計算的運算式的傳回值。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### 瀏覽器的怪癖 + + * 只有**code**關鍵被支援。 + +### Windows 的怪癖 + +由於[MSDN 文檔](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx)調用的腳本可以返回唯一字串值,否則該參數,傳遞給**回檔**將是`[null]`. + +## insertCSS + +> 注入到 CSS `InAppBrowser` 視窗。 + + ref.insertCSS(details, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + + * **injectDetails**: 要運行的腳本的詳細資訊或指定 `file` 或 `code` 的關鍵。*(物件)* + + * **file**: 樣式表的 URL 來注入。 + * **code**: 文本樣式表的注入。 + + * **callback**: 在 CSS 注射後執行的函數。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/src/blackberry10/doc/de/README.md b/src/blackberry10/doc/de/README.md new file mode 100644 index 000000000..e39448763 --- /dev/null +++ b/src/blackberry10/doc/de/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10-In-App-Browser-Plugin + +Die Funktionalität ist im app-Browser vollständig in gemeinsamen Js enthalten. Es gibt keine native Implementierung benötigt. Um dieses Plugin zu installieren, folgen Sie dem [Command-Line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Wenn Sie nicht die Cordova-Befehlszeilenschnittstelle verwenden, folgen Sie [Verwenden Plugman zu Plugins verwalten](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/es/README.md b/src/blackberry10/doc/es/README.md new file mode 100644 index 000000000..75303369f --- /dev/null +++ b/src/blackberry10/doc/es/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +El en el navegador de aplicación funcionalidad está enteramente dentro de js común. No hay ninguna aplicación nativa necesaria. Para instalar este plugin, siga la [Guía de la interfaz de línea de comandos](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Si no utiliza la interfaz de línea de comandos de Cordova, siga [Usando Plugman para gestionar Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/fr/README.md b/src/blackberry10/doc/fr/README.md new file mode 100644 index 000000000..179bd483c --- /dev/null +++ b/src/blackberry10/doc/fr/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +Le dans le navigateur de l'application, la fonctionnalité est entièrement contenue dans js commun. Il n'y a aucune implémentation native requise. Pour installer ce plugin, suivez le [Guide de l'Interface de ligne de commande](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Si vous n'utilisez pas l'Interface de ligne de commande de Cordova, suivez [Les Plugman à l'aide à gérer les Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/it/README.md b/src/blackberry10/doc/it/README.md new file mode 100644 index 000000000..8f0623df5 --- /dev/null +++ b/src/blackberry10/doc/it/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +Il browser app funzionalità è interamente contenuta nel comune js. Non esiste alcuna implementazione nativa richiesto. Per installare questo plugin, seguire la [Guida per l'interfaccia della riga di comando](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Se non si utilizza l'interfaccia della riga di comando di Cordova, seguire [Utilizzando Plugman per gestire i plugin](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/ja/README.md b/src/blackberry10/doc/ja/README.md new file mode 100644 index 000000000..b9e4b7b7a --- /dev/null +++ b/src/blackberry10/doc/ja/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +アプリケーション ブラウザーの機能は全く一般的な js に含まれています。 ネイティブ実装する必要はありません。 このプラグインをインストールするには[コマンド ライン インターフェイス ガイド](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +コルドバのコマンド ライン インターフェイスを使用していない場合は場合、[管理のプラグインを使用して Plugman](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)に従ってください。 ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/ko/README.md b/src/blackberry10/doc/ko/README.md new file mode 100644 index 000000000..67fb8de39 --- /dev/null +++ b/src/blackberry10/doc/ko/README.md @@ -0,0 +1,24 @@ + + +# 블랙베리 10 애플 리 케이 션-브라우저 플러그인 + +응용 프로그램 브라우저에서 기능은 완전히 포함 된 일반적인 js. 필요 없는 기본 구현이입니다. 이 플러그인을 설치 하려면 [명령줄 인터페이스 가이드](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface) 를 따라합니다. + +코르도바 명령줄 인터페이스를 사용 하지 않는 경우 [관리 플러그인을 사용 하 여 Plugman](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)를 따르십시오. ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/pl/README.md b/src/blackberry10/doc/pl/README.md new file mode 100644 index 000000000..ef199ee98 --- /dev/null +++ b/src/blackberry10/doc/pl/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +W aplikacji Przeglądarka funkcjonalność jest całkowicie zawarty w wspólnej js. Tam jest nie native wdrażania wymagane. Aby zainstalować ten plugin, następować po ten [Przewodnik interfejsu wiersza polecenia](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Jeśli nie używasz interfejsu wiersza polecenia Cordova, następować po [Przy użyciu Plugman do zarządzania wtyczki](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/zh/README.md b/src/blackberry10/doc/zh/README.md new file mode 100644 index 000000000..241fb5507 --- /dev/null +++ b/src/blackberry10/doc/zh/README.md @@ -0,0 +1,24 @@ + + +# 黑莓 10 的應用程式瀏覽器外掛程式 + +在應用程式瀏覽器功能完全包含在常見的 js。 還有沒有本機的實施所需。 若要安裝此外掛程式,請按照[命令列介面指南](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +如果你不使用的科爾多瓦命令列介面,請按照[使用 Plugman 管理外掛程式](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)。 ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file From 3413453d86eb7c34ffb5c05e77225dba4ef7a03c Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 17 Jun 2015 12:36:04 -0700 Subject: [PATCH 16/45] CB-9192 Updated version and RELEASENOTES.md for release 1.0.1 --- RELEASENOTES.md | 4 ++++ package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index f7a24cc03..f807fd06b 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -190,3 +190,7 @@ * Keep external android pages in a single tab. (close #61) * CB-8444 Add a clobber for `cordova.InAppBrowser.open` (close #80) * CB-8444 Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` + +### 1.0.1 (Jun 17, 2015) +* CB-9128 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* fix npm md issue diff --git a/package.json b/package.json index 96fc0d08e..bd50139a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "1.0.1-dev", + "version": "1.0.1", "description": "Cordova InAppBrowser Plugin", "cordova": { "id": "cordova-plugin-inappbrowser", diff --git a/plugin.xml b/plugin.xml index dcd630953..a95fdbe78 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.1"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 9c0733619..b1f73ffbe 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.1"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 47e332fc9270027c84a67b77f7223f2527977fd1 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 17 Jun 2015 14:14:41 -0700 Subject: [PATCH 17/45] CB-9202 updated repo url to github mirror in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bd50139a0..7039eafb9 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "repository": { "type": "git", - "url": "https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git" + "url": "https://github.com/apache/cordova-plugin-inappbrowser" }, "keywords": [ "cordova", From cb1c6b4d2427e6337f87a5b2488e336b2f253e5c Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 17 Jun 2015 17:35:36 -0700 Subject: [PATCH 18/45] CB-9192 Incremented plugin version. --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7039eafb9..f29e9b32a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "1.0.1", + "version": "1.0.2-dev", "description": "Cordova InAppBrowser Plugin", "cordova": { "id": "cordova-plugin-inappbrowser", diff --git a/plugin.xml b/plugin.xml index a95fdbe78..5817ed98b 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.2-dev"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index b1f73ffbe..7be9fc972 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.0.2-dev"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 74aa099b7e69ddc067a46c06e20d593ef5a0874a Mon Sep 17 00:00:00 2001 From: Anton Antonov Date: Thu, 18 Jun 2015 20:28:32 +0300 Subject: [PATCH 19/45] CB-9158 - InAppBrowser zoomControls are always set to true --- src/android/InAppBrowser.java | 71 +++++++++++++++-------------------- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index 217e48e1c..3ee185347 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -91,9 +91,9 @@ public class InAppBrowser extends CordovaPlugin { private boolean showLocationBar = true; private boolean showZoomControls = true; private boolean openWindowHidden = false; - private boolean clearAllCache= false; - private boolean clearSessionCache=false; - private boolean hadwareBackButton=true; + private boolean clearAllCache = false; + private boolean clearSessionCache = false; + private boolean hadwareBackButton = true; /** * Executes the request and returns PluginResult. @@ -113,9 +113,9 @@ public boolean execute(String action, CordovaArgs args, final CallbackContext ca } final String target = t; final HashMap features = parseFeature(args.optString(2)); - + Log.d(LOG_TAG, "target = " + target); - + this.cordova.getActivity().runOnUiThread(new Runnable() { @Override public void run() { @@ -185,7 +185,7 @@ else if (SYSTEM.equals(target)) { Log.d(LOG_TAG, "in blank"); result = showWebPage(url, features); } - + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, result); pluginResult.setKeepCallback(true); callbackContext.sendPluginResult(pluginResult); @@ -251,9 +251,9 @@ public void run() { */ @Override public void onReset() { - closeDialog(); + closeDialog(); } - + /** * Called by AccelBroker when listener is to be shut down. * Stop listener. @@ -261,7 +261,7 @@ public void onReset() { public void onDestroy() { closeDialog(); } - + /** * Inject an object (script or style) into the InAppBrowser WebView. * @@ -306,7 +306,7 @@ public void run() { /** * Put the list of features into a hash map - * + * * @param optString * @return */ @@ -348,7 +348,7 @@ public String openExternal(String url) { } else { intent.setData(uri); } - intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName()); + intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName()); this.cordova.getActivity().startActivity(intent); return ""; } catch (android.content.ActivityNotFoundException e) { @@ -373,12 +373,12 @@ public void run() { childView.setWebViewClient(new WebViewClient() { // NB: wait for about:blank before dismissing public void onPageFinished(WebView view, String url) { - if (dialog != null) { - dialog.dismiss(); - } - } - }); - // NB: From SDK 19: "If you call methods on WebView from any thread + if (dialog != null) { + dialog.dismiss(); + } + } + }); + // NB: From SDK 19: "If you call methods on WebView from any thread // other than your app's UI thread, it can cause unexpected results." // http://developer.android.com/guide/webapps/migrating.html#Threads childView.loadUrl("about:blank"); @@ -455,15 +455,6 @@ private boolean getShowLocationBar() { return this.showLocationBar; } - /** - * Should we show the zoom controls? - * - * @return boolean - */ - private boolean getShowZoomControls() { - return this.showZoomControls; - } - private InAppBrowser getInAppBrowser(){ return this; } @@ -487,7 +478,7 @@ public String showWebPage(final String url, HashMap features) { Boolean zoom = features.get(ZOOM); if (zoom != null) { showZoomControls = zoom.booleanValue(); - } + } Boolean hidden = features.get(HIDDEN); if (hidden != null) { openWindowHidden = hidden.booleanValue(); @@ -506,7 +497,7 @@ public String showWebPage(final String url, HashMap features) { } } } - + final CordovaWebView thatWebView = this.webView; // Create dialog in new thread @@ -540,7 +531,7 @@ public void run() { // Toolbar layout RelativeLayout toolbar = new RelativeLayout(cordova.getActivity()); - //Please, no more black! + //Please, no more black! toolbar.setBackgroundColor(android.graphics.Color.LTGRAY); toolbar.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44))); toolbar.setPadding(this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2)); @@ -656,7 +647,7 @@ public void onClick(View v) { WebSettings settings = inAppWebView.getSettings(); settings.setJavaScriptEnabled(true); settings.setJavaScriptCanOpenWindowsAutomatically(true); - settings.setBuiltInZoomControls(getShowZoomControls()); + settings.setBuiltInZoomControls(showZoomControls); settings.setPluginState(android.webkit.WebSettings.PluginState.ON); //Toggle whether this is enabled or not! @@ -733,7 +724,7 @@ private void sendUpdate(JSONObject obj, boolean keepCallback) { * * @param obj a JSONObject contain event payload information * @param status the status code to return to the JavaScript environment - */ + */ private void sendUpdate(JSONObject obj, boolean keepCallback, PluginResult.Status status) { if (callbackContext != null) { PluginResult result = new PluginResult(status, obj); @@ -744,7 +735,7 @@ private void sendUpdate(JSONObject obj, boolean keepCallback, PluginResult.Statu } } } - + /** * The webview client receives notifications about appView */ @@ -775,7 +766,7 @@ public void onPageStarted(WebView view, String url, Bitmap favicon) { String newloc = ""; if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("file:")) { newloc = url; - } + } // If dialing phone (tel:5551212) else if (url.startsWith(WebView.SCHEME_TEL)) { try { @@ -839,37 +830,37 @@ else if (url.startsWith("sms:")) { JSONObject obj = new JSONObject(); obj.put("type", LOAD_START_EVENT); obj.put("url", newloc); - + sendUpdate(obj, true); } catch (JSONException ex) { Log.d(LOG_TAG, "Should never happen"); } } - + public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); - + try { JSONObject obj = new JSONObject(); obj.put("type", LOAD_STOP_EVENT); obj.put("url", url); - + sendUpdate(obj, true); } catch (JSONException ex) { Log.d(LOG_TAG, "Should never happen"); } } - + public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { super.onReceivedError(view, errorCode, description, failingUrl); - + try { JSONObject obj = new JSONObject(); obj.put("type", LOAD_ERROR_EVENT); obj.put("url", failingUrl); obj.put("code", errorCode); obj.put("message", description); - + sendUpdate(obj, true, PluginResult.Status.ERROR); } catch (JSONException ex) { Log.d(LOG_TAG, "Should never happen"); From 5c7a9d95a8eea3b87b29eb4502b4b03d2e432ec8 Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Tue, 7 Jul 2015 17:52:53 -0700 Subject: [PATCH 20/45] remove travis-ci --- .travis.yml | 13 ------------- README.md | 2 -- 2 files changed, 15 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fa7ae7dad..000000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: objective-c -git: - depth: 2 -node_js: - - "0.10" -install: - - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - - cd .. - - npm install -g cordova-paramedic - - npm install -g cordova - - npm install -g ios-sim -script: - - cordova-paramedic --platform ios --plugin ${TRAVIS_BUILD_DIR} diff --git a/README.md b/README.md index 7567d40af..f9825f855 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,6 @@ # cordova-plugin-inappbrowser -[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) - This plugin provides a web browser view that displays when calling `cordova.InAppBrowser.open()`. var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); From 368cbcbc416d49eef40f951dc4cf3f968f448fc2 Mon Sep 17 00:00:00 2001 From: daserge Date: Thu, 16 Jul 2015 21:35:59 +0300 Subject: [PATCH 21/45] CB-9378 Fix InAppBrowser not taking whole screen on Windows --- www/inappbrowser.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/inappbrowser.css b/www/inappbrowser.css index 4dfb503e0..ef676c494 100644 --- a/www/inappbrowser.css +++ b/www/inappbrowser.css @@ -28,8 +28,8 @@ position: fixed; top: 0; left: 0; - width: calc(100% - 80px); - height: calc(100% - 80px); + width: 100%; + height: 100%; z-index: 9999999; border: 40px solid #bfbfbf; border: 40px solid rgba(0, 0, 0, 0.25); From 2279aee4ff4e7c363392dc9de4af278f96c2dca7 Mon Sep 17 00:00:00 2001 From: David Weber Date: Mon, 20 Jul 2015 13:09:58 +0200 Subject: [PATCH 22/45] Fix crash on browser window close (https://issues.apache.org/jira/browse/CB-9167) --- src/ios/CDVInAppBrowser.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 24f56c49f..9c11a4eb5 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -477,6 +477,11 @@ - (id)initWithUserAgent:(NSString*)userAgent prevUserAgent:(NSString*)prevUserAg return self; } +// Prevent crashes on closing windows +-(void)dealloc { + self.webView.delegate = nil; +} + - (void)createViews { // We create the views in code for primarily for ease of upgrades and not requiring an external .xib to be included From c08e2391434a15c27a2a85afd59a402bb7128a92 Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Mon, 14 Sep 2015 12:25:59 -0700 Subject: [PATCH 23/45] Close #114 From fee0d4e2d8063b66d195920668c0d3a6d339817b Mon Sep 17 00:00:00 2001 From: sgrebnov Date: Wed, 7 Oct 2015 11:44:07 +0300 Subject: [PATCH 24/45] CB-9760 InAppBrowser: fallback to default window.open behavior on Ripple --- www/inappbrowser.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/inappbrowser.js b/www/inappbrowser.js index a85f27e99..93eb4207b 100644 --- a/www/inappbrowser.js +++ b/www/inappbrowser.js @@ -19,6 +19,12 @@ * */ +// special patch to correctly work on Ripple emulator (CB-9760) +if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; +} + var exec = require('cordova/exec'); var channel = require('cordova/channel'); var modulemapper = require('cordova/modulemapper'); From 89c5ee54e7a7002f1cb903cd090b855ff50fb3ee Mon Sep 17 00:00:00 2001 From: Dmitry Blotsky Date: Fri, 23 Oct 2015 12:03:42 -0700 Subject: [PATCH 25/45] Fixing contribute link. --- CONTRIBUTING.md | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7dbcaba7..57606a1f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,37 +1 @@ - - -# Contributing to Apache Cordova - -Anyone can contribute to Cordova. And we need your contributions. - -There are multiple ways to contribute: report bugs, improve the docs, and -contribute code. - -For instructions on this, start with the -[contribution overview](http://cordova.apache.org/#contribute). - -The details are explained there, but the important items are: - - Sign and submit an Apache ICLA (Contributor License Agreement). - - Have a Jira issue open that corresponds to your contribution. - - Run the tests so your patch doesn't break existing functionality. - -We look forward to your contributions! +cordova-plugin-inappbrowser/CONTRIBUTE.md \ No newline at end of file From 32743e0eb905cb914d6cea30d5edbf37fd560b47 Mon Sep 17 00:00:00 2001 From: Dmitry Blotsky Date: Fri, 23 Oct 2015 12:11:50 -0700 Subject: [PATCH 26/45] Actually fixing the contribute link. --- CONTRIBUTING.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57606a1f3..4c8e6a5ea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1,37 @@ -cordova-plugin-inappbrowser/CONTRIBUTE.md \ No newline at end of file + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +There are multiple ways to contribute: report bugs, improve the docs, and +contribute code. + +For instructions on this, start with the +[contribution overview](http://cordova.apache.org/contribute/). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! From 1afd42aabbe51c949affb2d5f85e73858700b499 Mon Sep 17 00:00:00 2001 From: Paul Weber Date: Wed, 14 Oct 2015 19:22:14 +0200 Subject: [PATCH 27/45] CB-9799 Fixed javaDoc errors.. This closes #119 --- src/android/InAppBrowser.java | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index 3ee185347..60437451c 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -72,7 +72,6 @@ public class InAppBrowser extends CordovaPlugin { protected static final String LOG_TAG = "InAppBrowser"; private static final String SELF = "_self"; private static final String SYSTEM = "_system"; - // private static final String BLANK = "_blank"; private static final String EXIT_EVENT = "exit"; private static final String LOCATION = "location"; private static final String ZOOM = "zoom"; @@ -98,10 +97,10 @@ public class InAppBrowser extends CordovaPlugin { /** * Executes the request and returns PluginResult. * - * @param action The action to execute. - * @param args JSONArry of arguments for the plugin. - * @param callbackId The callback id used when calling back into JavaScript. - * @return A PluginResult object with a status and message. + * @param action the action to execute. + * @param args JSONArry of arguments for the plugin. + * @param callbackContext the callbackContext used when calling back into JavaScript. + * @return A PluginResult object with a status and message. */ public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException { if (action.equals("open")) { @@ -332,9 +331,8 @@ private HashMap parseFeature(String optString) { /** * Display a new browser with the specified URL. * - * @param url The url to load. - * @param usePhoneGap Load url in PhoneGap webview - * @return "" if ok, or error message. + * @param url the url to load. + * @return "" if ok, or error message. */ public String openExternal(String url) { try { @@ -462,8 +460,8 @@ private InAppBrowser getInAppBrowser(){ /** * Display a new browser with the specified URL. * - * @param url The url to load. - * @param jsonObject + * @param url the url to load. + * @param features jsonObject */ public String showWebPage(final String url, HashMap features) { // Determine if we should hide the location bar. @@ -746,8 +744,8 @@ public class InAppBrowserClient extends WebViewClient { /** * Constructor. * - * @param mContext - * @param edittext + * @param webView + * @param mEditText */ public InAppBrowserClient(CordovaWebView webView, EditText mEditText) { this.webView = webView; @@ -868,3 +866,4 @@ public void onReceivedError(WebView view, int errorCode, String description, Str } } } + From 790771bb00825ede0d8859913a509d8f4172d02f Mon Sep 17 00:00:00 2001 From: Julien Bouquillon Date: Thu, 10 Sep 2015 18:29:16 +0200 Subject: [PATCH 28/45] add JIRA issue tracker link --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f9825f855..f5c847d1d 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,10 @@ Although `window.open` is in the global scope, InAppBrowser is not available unt console.log("window.open works well"); } +:warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20InAppBrowser%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC) + + + ## Installation cordova plugin add cordova-plugin-inappbrowser @@ -383,4 +387,3 @@ Due to [MSDN docs](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.cont ref.addEventListener('loadstop', function() { ref.insertCSS({file: "mystyles.css"}); }); - From e89f602633291d9c286fb87872d5e01b44f86649 Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Mon, 16 Nov 2015 17:46:22 -0800 Subject: [PATCH 29/45] Close #113 From 6b99fb96f86484cf9d5b3d0c194a075adca75b42 Mon Sep 17 00:00:00 2001 From: sgrebnov Date: Tue, 17 Nov 2015 11:17:02 +0300 Subject: [PATCH 30/45] CB-10008 Fix InAppBrowser popup layout on Windows --- www/inappbrowser.css | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/www/inappbrowser.css b/www/inappbrowser.css index ef676c494..bd1526d3d 100644 --- a/www/inappbrowser.css +++ b/www/inappbrowser.css @@ -1,4 +1,4 @@ -/* +/* * 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 @@ -20,7 +20,6 @@ .inAppBrowserWrap { margin: 0; padding: 0; - border: 0; outline: 0; font-size: 100%; vertical-align: baseline; @@ -31,12 +30,11 @@ width: 100%; height: 100%; z-index: 9999999; + box-sizing: border-box; border: 40px solid #bfbfbf; border: 40px solid rgba(0, 0, 0, 0.25); } .inAppBrowserWrapFullscreen { - width: 100%; - height: 100%; border: 0; } From 49757716f556c7c87713f2f81469ab394c887b12 Mon Sep 17 00:00:00 2001 From: sgrebnov Date: Tue, 17 Nov 2015 11:42:55 +0300 Subject: [PATCH 31/45] CB-9150 Fix InAppBrowser executeScript crash on Windows if no data returned --- src/windows/InAppBrowserProxy.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/windows/InAppBrowserProxy.js b/src/windows/InAppBrowserProxy.js index 817516e50..fc037bdb4 100644 --- a/src/windows/InAppBrowserProxy.js +++ b/src/windows/InAppBrowserProxy.js @@ -1,4 +1,4 @@ -/* +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -247,7 +247,8 @@ var IAB = { if (isWebViewAvailable && browserWrap && popup) { var op = popup.invokeScriptAsync("eval", code); op.oncomplete = function (e) { - var result = [e.target.result]; + // return null if event target is unavailable by some reason + var result = (e && e.target) ? [e.target.result] : [null]; hasCallback && win(result); }; op.onerror = function () { }; From 1bc51f9381ccade59dad29f7a41dd37ec2a62f32 Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Tue, 17 Nov 2015 11:50:40 -0800 Subject: [PATCH 32/45] fix async self usage --- src/ios/CDVInAppBrowser.m | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 1e64a300d..9549e7380 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -214,14 +214,17 @@ - (void)show:(CDVInvokedUrlCommand*)command _previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle; - CDVInAppBrowserNavigationController* nav = [[CDVInAppBrowserNavigationController alloc] + __block CDVInAppBrowserNavigationController* nav = [[CDVInAppBrowserNavigationController alloc] initWithRootViewController:self.inAppBrowserViewController]; nav.orientationDelegate = self.inAppBrowserViewController; nav.navigationBarHidden = YES; + + __weak CDVInAppBrowser* weakSelf = self; + // Run later to avoid the "took a long time" log message. dispatch_async(dispatch_get_main_queue(), ^{ - if (self.inAppBrowserViewController != nil) { - [self.viewController presentViewController:nav animated:YES completion:nil]; + if (weakSelf.inAppBrowserViewController != nil) { + [weakSelf.viewController presentViewController:nav animated:YES completion:nil]; } }); } @@ -755,12 +758,14 @@ - (void)close [self.navigationDelegate browserExit]; } + __weak UIViewController* weakSelf = self; + // Run later to avoid the "took a long time" log message. dispatch_async(dispatch_get_main_queue(), ^{ - if ([self respondsToSelector:@selector(presentingViewController)]) { - [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil]; + if ([weakSelf respondsToSelector:@selector(presentingViewController)]) { + [[weakSelf presentingViewController] dismissViewControllerAnimated:YES completion:nil]; } else { - [[self parentViewController] dismissViewControllerAnimated:YES completion:nil]; + [[weakSelf parentViewController] dismissViewControllerAnimated:YES completion:nil]; } }); } @@ -772,10 +777,11 @@ - (void)navigateTo:(NSURL*)url if (_userAgentLockToken != 0) { [self.webView loadRequest:request]; } else { + __weak CDVInAppBrowser* weakSelf = self; [CDVUserAgentUtil acquireLock:^(NSInteger lockToken) { _userAgentLockToken = lockToken; [CDVUserAgentUtil setUserAgent:_userAgent lockToken:lockToken]; - [self.webView loadRequest:request]; + [weakSelf.webView loadRequest:request]; }]; } } From 2c002f0f8d86f611c4a7a481944c6dbb46b57d84 Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Tue, 17 Nov 2015 15:45:10 -0800 Subject: [PATCH 33/45] Close #85 From 620d92e5c0b6fc248c4567ac511a5f9027e3c6eb Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Tue, 17 Nov 2015 23:05:44 -0800 Subject: [PATCH 34/45] Close #91 From 6815a48408a2957f2d9d9f34267e00d54f07dc11 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 18 Nov 2015 13:54:08 -0800 Subject: [PATCH 35/45] CB-10035 Updated RELEASENOTES to be newest to oldest --- RELEASENOTES.md | 282 +++++++++++++++++++++++------------------------- 1 file changed, 136 insertions(+), 146 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index f807fd06b..7d794b264 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,83 +20,87 @@ --> # Release Notes -### 0.2.2 (Sept 25, 2013) -* CB-4889 bumping&resetting version -* CB-4788: Modified the onJsPrompt to warn against Cordova calls -* [windows8] commandProxy was moved -* CB-4788: Modified the onJsPrompt to warn against Cordova calls -* [windows8] commandProxy was moved -* CB-4889 renaming core references -* CB-4889 renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser -* CB-4864, CB-4865: Minor improvements to InAppBrowser -* Rename CHANGELOG.md -> RELEASENOTES.md -* [CB-4792] Added keepCallback to the show function. -* [CB-4752] Incremented plugin version on dev branch. - -### 0.2.3 (Oct 9, 2013) -* [CB-4915] Incremented plugin version on dev branch. -* [CB-4926] Fixes inappbrowser plugin loading for windows8 - -### 0.2.4 (Oct 28, 2013) -* CB-5128: added repo + issue tag to plugin.xml for inappbrowser plugin -* CB-4995 Fix crash when WebView is quickly opened then closed. -* CB-4930 - iOS - InAppBrowser should take into account the status bar -* [CB-5010] Incremented plugin version on dev branch. -* [CB-5010] Updated version and RELEASENOTES.md for release 0.2.3 -* CB-4858 - Run IAB methods on the UI thread. -* CB-4858 Convert relative URLs to absolute URLs in JS -* CB-3747 Fix back button having different dismiss logic from the close button. -* CB-5021 Expose closeDialog() as a public function and make it safe to call multiple times. -* CB-5021 Make it safe to call close() multiple times - -### 0.2.5 (Dec 4, 2013) -* Remove merge conflict tag -* [CB-4724] fixed UriFormatException -* add ubuntu platform -* CB-3420 WP feature hidden=yes implemented -* Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' +### 1.0.1 (Jun 17, 2015) +* CB-9128 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* fix npm md issue -### 0.3.0 (Jan 02, 2014) -* CB-5592 Android: Add MIME type to Intent when opening file:/// URLs -* CB-5594 iOS: Add disallowoverscroll option. -* CB-5658 Add doc/index.md for InAppBrowser plugin -* CB-5595 Add toolbarposition=top option. -* Apply CB-5193 to InAppBrowser (Fix DB quota exception) -* CB-5593 iOS: Make InAppBrowser localizable -* CB-5591 Change window.escape to encodeURIComponent +### 1.0.0 (Apr 15, 2015) +* CB-8746 gave plugin major version bump +* CB-7689 Adds insertCSS support for windows platform +* CB-4930 - (prefix) InAppBrowser should take into account the status bar +* CB-8635 Improves UX on windows platform +* CB-8661 Return executed script result on Windows +* CB-8683 updated wp and browser specific references of old id to new id +* CB-8683 changed plugin-id to pacakge-name +* CB-8653 properly updated translated docs to use new id +* CB-8653 updated translated docs to use new id +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* CB-8432 Correct styles for browser wrapper to display it correctly on some pages +* CB-8659 - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) +* CB-7961 Add cordova-plugin-inappbrowser support for browser platform +* CB-8653 Updated Readme +* Update docs for Android zoom=no option +* Added option to disable/enable zoom controls +* updated docs, set hardwareback default to true +* Add a hardwareback option to allow for the hardware back button to go back. +* CB-8570 Integrate TravisCI +* CB-8438 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* CB-8538 Added package.json file +* Keep external android pages in a single tab. (close #61) +* CB-8444 Add a clobber for `cordova.InAppBrowser.open` (close #80) +* CB-8444 Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` -### 0.3.1 (Feb 05, 2014) -* CB-5756: Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ -* Didn't test on ICS or lower, getDrawable isn't supported until Jellybean -* add ubuntu platform -* Adding drawables to the inAppBrowser. This doesn't look quite right, but it's a HUGE improvement over the previous settings -* CB-5756: Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ -* Remove alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. -* CB-5733 Fix IAB.close() not working if called before show() animation is done +### 0.6.0 (Feb 04, 2015) +* CB-8270 ios: Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` +* ubuntu: implement `inject*` functions +* ubuntu: port to oxide +* CB-7897 ios, android: Update to work with whilelist plugins in Cordova 4.x -### 0.3.2 (Feb 26, 2014) -* Validate that callbackId is correctly formed -* CB-6035 Move js-module so it is not loaded on unsupported platforms -* Removed some iOS6 Deprecations +### 0.5.4 (Dec 02, 2014) +* CB-7784 Exit event is not fired after `InAppBrowser` closing +* CB-7697 Add `locationBar` support to `InAppBrowser` **Windows** platform version +* CB-7690 `InAppBrowser` `loadstart/loadstop` events issues +* CB-7695 Fix `InAppBrowser` `injectScriptFile` for **Windows 8.1** / **Windows Phone 8.1** +* CB-7692 `InAppBrowser` local url opening bug in 8.1 +* CB-7688 `Alert` is not supported in `InAppBrowser` on **Windows** platform +* CB-7977 Mention `deviceready` in plugin docs +* CB-7876 change test target to avoid undesired redirects +* CB-7712 remove references to `closebuttoncaption` +* CB-7850 clarify role of whitelist +* CB-7720 check if event is null since OK string from success callback was removed +* CB-7471 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -### 0.3.3 (Mar 5, 2014) -* CB-5534 Fix video/audio does not stop playing when browser is closed -* CB-6172 Fix broken install on case-sensitive file-systems +### 0.5.3 (Oct 03, 2014) +* Windows implementation fixes and improvements +* zIndex fixed +* renamed InAppBrowser back to inappbrowser for case sensitive operating systems +* Update french translation +* Update doc to add Windows 8 +* Update windows proxy to be both compatible with windows 8 and 8.1 +* Rename windows81 by windows8 in src directory +* Append Windows 8.1 platform configuration in plugin.xml +* Append Windows 8.1 proxy using x-ms-webview +### 0.5.2 (Sep 17, 2014) +* CB-7471 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* CB-7490 Fixes InAppBrowser manual tests crash on windows platform +* CB-7249 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* CB-7424 Wrong docs: anchor tags are not supported by the InAppBrowser +* CB-7133 clarify that anchor1 doesn't exist +* CB-7133 more fixup of tests on Android +* CB-7133 fix up the tests for Android +* Add just a bit more logging +* CB-7133 port inappbrowser to plugin-test-framework +* phonegap events supported for \_blank target +* inappbrowser \_blank target position is fixed +* amazon-fireos related changes. -### 0.4.0 (Apr 17, 2014) -* CB-6360: [ios] Fix for crash on iOS < 6.0 (closes #37) -* CB-3324: [WP8] Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed -* [WP] await async calls, resolve warnings -* [WP] Make InAppBrowser work with embedded files, using system behavior -* CB-6402: [WP8] pass empty string instead of null for [optional] windowFeatures string -* CB-6422: [windows8] use cordova/exec/proxy -* CB-6389 CB-3617: Add clearcache and clearsessioncache options to iOS (like Android) -* Doc update: event name and example param (closes #31) -* CB-6253: [WP] Add Network Capability to WMAppManifest.xml -* CB-6212: [iOS] fix warnings compiled under arm64 64-bit -* CB-6218: Update docs for BB10 -* CB-6460: Update license headers +### 0.5.1 (Aug 06, 2014) +* ubuntu: support qt 5.2 +* **FFOS** update InAppBrowserProxy.js +* **FFOS** app needs to be privileged +* CB-6127 Updated translations for docs +* CB-6769 ios: Fix statusbar color reset wasn't working on iOS7+ ### 0.5.0 (Jun 05, 2014) * CB-6127 Spanish and rench Translations added. Github close #23 @@ -113,84 +117,70 @@ * refactoring fixed * CB-6396 [Firefox OS] Adding basic support -### 0.5.1 (Aug 06, 2014) -* ubuntu: support qt 5.2 -* **FFOS** update InAppBrowserProxy.js -* **FFOS** app needs to be privileged -* CB-6127 Updated translations for docs -* CB-6769 ios: Fix statusbar color reset wasn't working on iOS7+ +### 0.4.0 (Apr 17, 2014) +* CB-6360: [ios] Fix for crash on iOS < 6.0 (closes #37) +* CB-3324: [WP8] Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed +* [WP] await async calls, resolve warnings +* [WP] Make InAppBrowser work with embedded files, using system behavior +* CB-6402: [WP8] pass empty string instead of null for [optional] windowFeatures string +* CB-6422: [windows8] use cordova/exec/proxy +* CB-6389 CB-3617: Add clearcache and clearsessioncache options to iOS (like Android) +* Doc update: event name and example param (closes #31) +* CB-6253: [WP] Add Network Capability to WMAppManifest.xml +* CB-6212: [iOS] fix warnings compiled under arm64 64-bit +* CB-6218: Update docs for BB10 +* CB-6460: Update license headers -### 0.5.2 (Sep 17, 2014) -* CB-7471 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* CB-7490 Fixes InAppBrowser manual tests crash on windows platform -* CB-7249 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* CB-7424 Wrong docs: anchor tags are not supported by the InAppBrowser -* CB-7133 clarify that anchor1 doesn't exist -* CB-7133 more fixup of tests on Android -* CB-7133 fix up the tests for Android -* Add just a bit more logging -* CB-7133 port inappbrowser to plugin-test-framework -* phonegap events supported for \_blank target -* inappbrowser \_blank target position is fixed -* amazon-fireos related changes. +### 0.3.3 (Mar 5, 2014) +* CB-5534 Fix video/audio does not stop playing when browser is closed +* CB-6172 Fix broken install on case-sensitive file-systems -### 0.5.3 (Oct 03, 2014) -* Windows implementation fixes and improvements -* zIndex fixed -* renamed InAppBrowser back to inappbrowser for case sensitive operating systems -* Update french translation -* Update doc to add Windows 8 -* Update windows proxy to be both compatible with windows 8 and 8.1 -* Rename windows81 by windows8 in src directory -* Append Windows 8.1 platform configuration in plugin.xml -* Append Windows 8.1 proxy using x-ms-webview +### 0.3.2 (Feb 26, 2014) +* Validate that callbackId is correctly formed +* CB-6035 Move js-module so it is not loaded on unsupported platforms +* Removed some iOS6 Deprecations -### 0.5.4 (Dec 02, 2014) -* CB-7784 Exit event is not fired after `InAppBrowser` closing -* CB-7697 Add `locationBar` support to `InAppBrowser` **Windows** platform version -* CB-7690 `InAppBrowser` `loadstart/loadstop` events issues -* CB-7695 Fix `InAppBrowser` `injectScriptFile` for **Windows 8.1** / **Windows Phone 8.1** -* CB-7692 `InAppBrowser` local url opening bug in 8.1 -* CB-7688 `Alert` is not supported in `InAppBrowser` on **Windows** platform -* CB-7977 Mention `deviceready` in plugin docs -* CB-7876 change test target to avoid undesired redirects -* CB-7712 remove references to `closebuttoncaption` -* CB-7850 clarify role of whitelist -* CB-7720 check if event is null since OK string from success callback was removed -* CB-7471 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +### 0.3.1 (Feb 05, 2014) +* CB-5756: Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Didn't test on ICS or lower, getDrawable isn't supported until Jellybean +* add ubuntu platform +* Adding drawables to the inAppBrowser. This doesn't look quite right, but it's a HUGE improvement over the previous settings +* CB-5756: Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Remove alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. +* CB-5733 Fix IAB.close() not working if called before show() animation is done -### 0.6.0 (Feb 04, 2015) -* CB-8270 ios: Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` -* ubuntu: implement inject* functions -* ubuntu: port to oxide -* CB-7897 ios, android: Update to work with whilelist plugins in Cordova 4.x +### 0.2.5 (Dec 4, 2013) +* Remove merge conflict tag +* [CB-4724] fixed UriFormatException +* add ubuntu platform +* CB-3420 WP feature hidden=yes implemented +* Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' -### 1.0.0 (Apr 15, 2015) -* CB-8746 gave plugin major version bump -* CB-7689 Adds insertCSS support for windows platform -* CB-4930 - (prefix) InAppBrowser should take into account the status bar -* CB-8635 Improves UX on windows platform -* CB-8661 Return executed script result on Windows -* CB-8683 updated wp and browser specific references of old id to new id -* CB-8683 changed plugin-id to pacakge-name -* CB-8653 properly updated translated docs to use new id -* CB-8653 updated translated docs to use new id -* Use TRAVIS_BUILD_DIR, install paramedic by npm -* CB-8432 Correct styles for browser wrapper to display it correctly on some pages -* CB-8659 - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) -* CB-7961 Add cordova-plugin-inappbrowser support for browser platform -* CB-8653 Updated Readme -* Update docs for Android zoom=no option -* Added option to disable/enable zoom controls -* updated docs, set hardwareback default to true -* Add a hardwareback option to allow for the hardware back button to go back. -* CB-8570 Integrate TravisCI -* CB-8438 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* CB-8538 Added package.json file -* Keep external android pages in a single tab. (close #61) -* CB-8444 Add a clobber for `cordova.InAppBrowser.open` (close #80) -* CB-8444 Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` +### 0.2.4 (Oct 28, 2013) +* CB-5128: added repo + issue tag to plugin.xml for inappbrowser plugin +* CB-4995 Fix crash when WebView is quickly opened then closed. +* CB-4930 - iOS - InAppBrowser should take into account the status bar +* [CB-5010] Incremented plugin version on dev branch. +* [CB-5010] Updated version and RELEASENOTES.md for release 0.2.3 +* CB-4858 - Run IAB methods on the UI thread. +* CB-4858 Convert relative URLs to absolute URLs in JS +* CB-3747 Fix back button having different dismiss logic from the close button. +* CB-5021 Expose closeDialog() as a public function and make it safe to call multiple times. +* CB-5021 Make it safe to call close() multiple times -### 1.0.1 (Jun 17, 2015) -* CB-9128 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* fix npm md issue +### 0.2.3 (Oct 9, 2013) +* [CB-4915] Incremented plugin version on dev branch. +* [CB-4926] Fixes inappbrowser plugin loading for windows8 + +### 0.2.2 (Sept 25, 2013) +* CB-4889 bumping&resetting version +* CB-4788: Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* CB-4788: Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* CB-4889 renaming core references +* CB-4889 renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser +* CB-4864, CB-4865: Minor improvements to InAppBrowser +* Rename CHANGELOG.md -> RELEASENOTES.md +* [CB-4792] Added keepCallback to the show function. +* [CB-4752] Incremented plugin version on dev branch. From 682703aa246694c9afbc4a46129113536b69a37b Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Wed, 18 Nov 2015 14:22:06 -0800 Subject: [PATCH 36/45] weak ref type was wrong --- src/ios/CDVInAppBrowser.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 9549e7380..47a8ab3a8 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -777,7 +777,7 @@ - (void)navigateTo:(NSURL*)url if (_userAgentLockToken != 0) { [self.webView loadRequest:request]; } else { - __weak CDVInAppBrowser* weakSelf = self; + __weak CDVInAppBrowserViewController* weakSelf = self; [CDVUserAgentUtil acquireLock:^(NSInteger lockToken) { _userAgentLockToken = lockToken; [CDVUserAgentUtil setUserAgent:_userAgent lockToken:lockToken]; From e32b95ccf92c2894a5572d26fda6cb4f8b7f0a6a Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 18 Nov 2015 15:02:03 -0800 Subject: [PATCH 37/45] removed r prefix from tags From 5451427c988c9d219f177ca7749e2df513de6aec Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 18 Nov 2015 19:45:05 -0800 Subject: [PATCH 38/45] CB-10035 Updated version and RELEASENOTES.md for release 1.1.0 --- RELEASENOTES.md | 15 +++++++++++++++ package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 7d794b264..355e05d56 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,21 @@ --> # Release Notes +### 1.1.0 (Nov 18, 2015) +* CB-10035 Updated `RELEASENOTES` to be newest to oldest +* Invoke webview if using local file +* Fixed `zIndex` issue on **Windows 8**, **8.188 where InAppBrowser opens behind default app. +* fix `async` self usage +* CB-9150 Fix InAppBrowser `executeScript` crash on **Windows** if no data returned +* CB-10008 Fix InAppBrowser popup layout on **Windows** +* Setting `setStatusBarStyle` to `-1` causes `CGContextSaveGState`. +* CB-9167 Fix crash on **browser** window close +* CB-9799 Fixed `javaDoc` errors. +* Fixing contribute link. +* CB-9760 InAppBrowser: fallback to default `window.open` behavior on **Ripple** +* CB-9378 Fix InAppBrowser not taking whole screen on **Windows** +* CB-9158 - InAppBrowser `zoomControls` are always set to true + ### 1.0.1 (Jun 17, 2015) * CB-9128 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser * fix npm md issue diff --git a/package.json b/package.json index f29e9b32a..cba3e5f28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "1.0.2-dev", + "version": "1.1.0", "description": "Cordova InAppBrowser Plugin", "cordova": { "id": "cordova-plugin-inappbrowser", diff --git a/plugin.xml b/plugin.xml index 5817ed98b..a05fddc7f 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.1.0"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 7be9fc972..f4f3be361 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.1.0"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 1cd9205eb58e7241b299d42620a576103b49eede Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Wed, 18 Nov 2015 22:11:41 -0800 Subject: [PATCH 39/45] CB-10035 linked issues in RELEASENOTES.md --- RELEASENOTES.md | 192 ++++++++++++++++++++++++------------------------ 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 355e05d56..1e2005d8a 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -21,69 +21,69 @@ # Release Notes ### 1.1.0 (Nov 18, 2015) -* CB-10035 Updated `RELEASENOTES` to be newest to oldest +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest * Invoke webview if using local file * Fixed `zIndex` issue on **Windows 8**, **8.188 where InAppBrowser opens behind default app. * fix `async` self usage -* CB-9150 Fix InAppBrowser `executeScript` crash on **Windows** if no data returned -* CB-10008 Fix InAppBrowser popup layout on **Windows** +* [CB-9150](https://issues.apache.org/jira/browse/CB-9150) Fix InAppBrowser `executeScript` crash on **Windows** if no data returned +* [CB-10008](https://issues.apache.org/jira/browse/CB-10008) Fix InAppBrowser popup layout on **Windows** * Setting `setStatusBarStyle` to `-1` causes `CGContextSaveGState`. -* CB-9167 Fix crash on **browser** window close -* CB-9799 Fixed `javaDoc` errors. +* [CB-9167](https://issues.apache.org/jira/browse/CB-9167) Fix crash on **browser** window close +* [CB-9799](https://issues.apache.org/jira/browse/CB-9799) Fixed `javaDoc` errors. * Fixing contribute link. -* CB-9760 InAppBrowser: fallback to default `window.open` behavior on **Ripple** -* CB-9378 Fix InAppBrowser not taking whole screen on **Windows** -* CB-9158 - InAppBrowser `zoomControls` are always set to true +* [CB-9760](https://issues.apache.org/jira/browse/CB-9760) InAppBrowser: fallback to default `window.open` behavior on **Ripple** +* [CB-9378](https://issues.apache.org/jira/browse/CB-9378) Fix InAppBrowser not taking whole screen on **Windows** +* [CB-9158](https://issues.apache.org/jira/browse/CB-9158) - InAppBrowser `zoomControls` are always set to true ### 1.0.1 (Jun 17, 2015) -* CB-9128 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser * fix npm md issue ### 1.0.0 (Apr 15, 2015) -* CB-8746 gave plugin major version bump -* CB-7689 Adds insertCSS support for windows platform -* CB-4930 - (prefix) InAppBrowser should take into account the status bar -* CB-8635 Improves UX on windows platform -* CB-8661 Return executed script result on Windows -* CB-8683 updated wp and browser specific references of old id to new id -* CB-8683 changed plugin-id to pacakge-name -* CB-8653 properly updated translated docs to use new id -* CB-8653 updated translated docs to use new id +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-7689](https://issues.apache.org/jira/browse/CB-7689) Adds insertCSS support for windows platform +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - (prefix) InAppBrowser should take into account the status bar +* [CB-8635](https://issues.apache.org/jira/browse/CB-8635) Improves UX on windows platform +* [CB-8661](https://issues.apache.org/jira/browse/CB-8661) Return executed script result on Windows +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) updated wp and browser specific references of old id to new id +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id * Use TRAVIS_BUILD_DIR, install paramedic by npm -* CB-8432 Correct styles for browser wrapper to display it correctly on some pages -* CB-8659 - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) -* CB-7961 Add cordova-plugin-inappbrowser support for browser platform -* CB-8653 Updated Readme +* [CB-8432](https://issues.apache.org/jira/browse/CB-8432) Correct styles for browser wrapper to display it correctly on some pages +* [CB-8659](https://issues.apache.org/jira/browse/CB-8659) - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) +* [CB-7961](https://issues.apache.org/jira/browse/CB-7961) Add cordova-plugin-inappbrowser support for browser platform +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme * Update docs for Android zoom=no option * Added option to disable/enable zoom controls * updated docs, set hardwareback default to true * Add a hardwareback option to allow for the hardware back button to go back. -* CB-8570 Integrate TravisCI -* CB-8438 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* CB-8538 Added package.json file +* [CB-8570](https://issues.apache.org/jira/browse/CB-8570) Integrate TravisCI +* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file * Keep external android pages in a single tab. (close #61) -* CB-8444 Add a clobber for `cordova.InAppBrowser.open` (close #80) -* CB-8444 Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Add a clobber for `cordova.InAppBrowser.open` (close #80) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` ### 0.6.0 (Feb 04, 2015) -* CB-8270 ios: Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` +* [CB-8270](https://issues.apache.org/jira/browse/CB-8270) ios: Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` * ubuntu: implement `inject*` functions * ubuntu: port to oxide -* CB-7897 ios, android: Update to work with whilelist plugins in Cordova 4.x +* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) ios, android: Update to work with whilelist plugins in Cordova 4.x ### 0.5.4 (Dec 02, 2014) -* CB-7784 Exit event is not fired after `InAppBrowser` closing -* CB-7697 Add `locationBar` support to `InAppBrowser` **Windows** platform version -* CB-7690 `InAppBrowser` `loadstart/loadstop` events issues -* CB-7695 Fix `InAppBrowser` `injectScriptFile` for **Windows 8.1** / **Windows Phone 8.1** -* CB-7692 `InAppBrowser` local url opening bug in 8.1 -* CB-7688 `Alert` is not supported in `InAppBrowser` on **Windows** platform -* CB-7977 Mention `deviceready` in plugin docs -* CB-7876 change test target to avoid undesired redirects -* CB-7712 remove references to `closebuttoncaption` -* CB-7850 clarify role of whitelist -* CB-7720 check if event is null since OK string from success callback was removed -* CB-7471 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7784](https://issues.apache.org/jira/browse/CB-7784) Exit event is not fired after `InAppBrowser` closing +* [CB-7697](https://issues.apache.org/jira/browse/CB-7697) Add `locationBar` support to `InAppBrowser` **Windows** platform version +* [CB-7690](https://issues.apache.org/jira/browse/CB-7690) `InAppBrowser` `loadstart/loadstop` events issues +* [CB-7695](https://issues.apache.org/jira/browse/CB-7695) Fix `InAppBrowser` `injectScriptFile` for **Windows 8.1** / **Windows Phone 8.1** +* [CB-7692](https://issues.apache.org/jira/browse/CB-7692) `InAppBrowser` local url opening bug in 8.1 +* [CB-7688](https://issues.apache.org/jira/browse/CB-7688) `Alert` is not supported in `InAppBrowser` on **Windows** platform +* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs +* [CB-7876](https://issues.apache.org/jira/browse/CB-7876) change test target to avoid undesired redirects +* [CB-7712](https://issues.apache.org/jira/browse/CB-7712) remove references to `closebuttoncaption` +* [CB-7850](https://issues.apache.org/jira/browse/CB-7850) clarify role of whitelist +* [CB-7720](https://issues.apache.org/jira/browse/CB-7720) check if event is null since OK string from success callback was removed +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser ### 0.5.3 (Oct 03, 2014) * Windows implementation fixes and improvements @@ -97,15 +97,15 @@ * Append Windows 8.1 proxy using x-ms-webview ### 0.5.2 (Sep 17, 2014) -* CB-7471 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* CB-7490 Fixes InAppBrowser manual tests crash on windows platform -* CB-7249 cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* CB-7424 Wrong docs: anchor tags are not supported by the InAppBrowser -* CB-7133 clarify that anchor1 doesn't exist -* CB-7133 more fixup of tests on Android -* CB-7133 fix up the tests for Android +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7490](https://issues.apache.org/jira/browse/CB-7490) Fixes InAppBrowser manual tests crash on windows platform +* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7424](https://issues.apache.org/jira/browse/CB-7424) Wrong docs: anchor tags are not supported by the InAppBrowser +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) clarify that anchor1 doesn't exist +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) more fixup of tests on Android +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) fix up the tests for Android * Add just a bit more logging -* CB-7133 port inappbrowser to plugin-test-framework +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) port inappbrowser to plugin-test-framework * phonegap events supported for \_blank target * inappbrowser \_blank target position is fixed * amazon-fireos related changes. @@ -114,88 +114,88 @@ * ubuntu: support qt 5.2 * **FFOS** update InAppBrowserProxy.js * **FFOS** app needs to be privileged -* CB-6127 Updated translations for docs -* CB-6769 ios: Fix statusbar color reset wasn't working on iOS7+ +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs +* [CB-6769](https://issues.apache.org/jira/browse/CB-6769) ios: Fix statusbar color reset wasn't working on iOS7+ ### 0.5.0 (Jun 05, 2014) -* CB-6127 Spanish and rench Translations added. Github close #23 +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and rench Translations added. Github close #23 * Clean up whitespace (mainly due to no newline at eof warning) * Adding permission info -* CB-6806 Add license -* CB-6491 add CONTRIBUTING.md +* [CB-6806](https://issues.apache.org/jira/browse/CB-6806) Add license +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md * Add necessary capability so the plugin works on its own -* CB-6474 InAppBrowser. Add data urls support to WP8 -* CB-6482 InAppBrowser calls incorrect callback on WP8 +* [CB-6474](https://issues.apache.org/jira/browse/CB-6474) InAppBrowser. Add data urls support to WP8 +* [CB-6482](https://issues.apache.org/jira/browse/CB-6482) InAppBrowser calls incorrect callback on WP8 * Fixed use of iOS 6 deprecated methods -* CB-6360 - improvement: feature detection instead of iOS version detection -* CB-5649 - InAppBrowser overrides App's orientation +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) - improvement: feature detection instead of iOS version detection +* [CB-5649](https://issues.apache.org/jira/browse/CB-5649) - InAppBrowser overrides App's orientation * refactoring fixed -* CB-6396 [Firefox OS] Adding basic support +* [CB-6396](https://issues.apache.org/jira/browse/CB-6396) [Firefox OS] Adding basic support ### 0.4.0 (Apr 17, 2014) -* CB-6360: [ios] Fix for crash on iOS < 6.0 (closes #37) -* CB-3324: [WP8] Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360): [ios] Fix for crash on iOS < 6.0 (closes #37) +* [CB-3324](https://issues.apache.org/jira/browse/CB-3324): [WP8] Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed * [WP] await async calls, resolve warnings * [WP] Make InAppBrowser work with embedded files, using system behavior -* CB-6402: [WP8] pass empty string instead of null for [optional] windowFeatures string -* CB-6422: [windows8] use cordova/exec/proxy -* CB-6389 CB-3617: Add clearcache and clearsessioncache options to iOS (like Android) +* [CB-6402](https://issues.apache.org/jira/browse/CB-6402): [WP8] pass empty string instead of null for [optional] windowFeatures string +* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy +* [CB-6389](https://issues.apache.org/jira/browse/CB-6389) [CB-3617](https://issues.apache.org/jira/browse/CB-3617): Add clearcache and clearsessioncache options to iOS (like Android) * Doc update: event name and example param (closes #31) -* CB-6253: [WP] Add Network Capability to WMAppManifest.xml -* CB-6212: [iOS] fix warnings compiled under arm64 64-bit -* CB-6218: Update docs for BB10 -* CB-6460: Update license headers +* [CB-6253](https://issues.apache.org/jira/browse/CB-6253): [WP] Add Network Capability to WMAppManifest.xml +* [CB-6212](https://issues.apache.org/jira/browse/CB-6212): [iOS] fix warnings compiled under arm64 64-bit +* [CB-6218](https://issues.apache.org/jira/browse/CB-6218): Update docs for BB10 +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers ### 0.3.3 (Mar 5, 2014) -* CB-5534 Fix video/audio does not stop playing when browser is closed -* CB-6172 Fix broken install on case-sensitive file-systems +* [CB-5534](https://issues.apache.org/jira/browse/CB-5534) Fix video/audio does not stop playing when browser is closed +* [CB-6172](https://issues.apache.org/jira/browse/CB-6172) Fix broken install on case-sensitive file-systems ### 0.3.2 (Feb 26, 2014) * Validate that callbackId is correctly formed -* CB-6035 Move js-module so it is not loaded on unsupported platforms +* [CB-6035](https://issues.apache.org/jira/browse/CB-6035) Move js-module so it is not loaded on unsupported platforms * Removed some iOS6 Deprecations ### 0.3.1 (Feb 05, 2014) -* CB-5756: Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756): Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ * Didn't test on ICS or lower, getDrawable isn't supported until Jellybean * add ubuntu platform * Adding drawables to the inAppBrowser. This doesn't look quite right, but it's a HUGE improvement over the previous settings -* CB-5756: Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756): Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ * Remove alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. -* CB-5733 Fix IAB.close() not working if called before show() animation is done +* [CB-5733](https://issues.apache.org/jira/browse/CB-5733) Fix IAB.close() not working if called before show() animation is done ### 0.2.5 (Dec 4, 2013) * Remove merge conflict tag -* [CB-4724] fixed UriFormatException +* [CB-4724](https://issues.apache.org/jira/browse/CB-4724) fixed UriFormatException * add ubuntu platform -* CB-3420 WP feature hidden=yes implemented +* [CB-3420](https://issues.apache.org/jira/browse/CB-3420) WP feature hidden=yes implemented * Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' ### 0.2.4 (Oct 28, 2013) -* CB-5128: added repo + issue tag to plugin.xml for inappbrowser plugin -* CB-4995 Fix crash when WebView is quickly opened then closed. -* CB-4930 - iOS - InAppBrowser should take into account the status bar -* [CB-5010] Incremented plugin version on dev branch. -* [CB-5010] Updated version and RELEASENOTES.md for release 0.2.3 -* CB-4858 - Run IAB methods on the UI thread. -* CB-4858 Convert relative URLs to absolute URLs in JS -* CB-3747 Fix back button having different dismiss logic from the close button. -* CB-5021 Expose closeDialog() as a public function and make it safe to call multiple times. -* CB-5021 Make it safe to call close() multiple times +* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag to plugin.xml for inappbrowser plugin +* [CB-4995](https://issues.apache.org/jira/browse/CB-4995) Fix crash when WebView is quickly opened then closed. +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - iOS - InAppBrowser should take into account the status bar +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) - Run IAB methods on the UI thread. +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) Convert relative URLs to absolute URLs in JS +* [CB-3747](https://issues.apache.org/jira/browse/CB-3747) Fix back button having different dismiss logic from the close button. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Expose closeDialog() as a public function and make it safe to call multiple times. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Make it safe to call close() multiple times ### 0.2.3 (Oct 9, 2013) -* [CB-4915] Incremented plugin version on dev branch. -* [CB-4926] Fixes inappbrowser plugin loading for windows8 +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. +* [CB-4926](https://issues.apache.org/jira/browse/CB-4926) Fixes inappbrowser plugin loading for windows8 ### 0.2.2 (Sept 25, 2013) -* CB-4889 bumping&resetting version -* CB-4788: Modified the onJsPrompt to warn against Cordova calls +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788): Modified the onJsPrompt to warn against Cordova calls * [windows8] commandProxy was moved -* CB-4788: Modified the onJsPrompt to warn against Cordova calls +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788): Modified the onJsPrompt to warn against Cordova calls * [windows8] commandProxy was moved -* CB-4889 renaming core references -* CB-4889 renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser -* CB-4864, CB-4865: Minor improvements to InAppBrowser +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming core references +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser +* [CB-4864](https://issues.apache.org/jira/browse/CB-4864), [CB-4865](https://issues.apache.org/jira/browse/CB-4865): Minor improvements to InAppBrowser * Rename CHANGELOG.md -> RELEASENOTES.md -* [CB-4792] Added keepCallback to the show function. -* [CB-4752] Incremented plugin version on dev branch. +* [CB-4792](https://issues.apache.org/jira/browse/CB-4792) Added keepCallback to the show function. +* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. From bc9036d90a1f3f2220b5fc29b77cf2405e7fd781 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Thu, 19 Nov 2015 15:22:30 -0800 Subject: [PATCH 40/45] CB-10040 - Compile Error in InAppBrowser Plugin for iOS - No known instance method for selector 'URLIsWhitelisted:' --- src/ios/CDVInAppBrowser.m | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 47a8ab3a8..e52865040 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -231,16 +231,12 @@ - (void)show:(CDVInvokedUrlCommand*)command - (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options { - if ([self.commandDelegate URLIsWhitelisted:url]) { NSURLRequest* request = [NSURLRequest requestWithURL:url]; #ifdef __CORDOVA_4_0_0 [self.webViewEngine loadRequest:request]; #else [self.webView loadRequest:request]; #endif - } else { // this assumes the InAppBrowser can be excepted from the white-list - [self openInInAppBrowser:url withOptions:options]; - } } - (void)openInSystem:(NSURL*)url From 8142c73c84003a3c71088e9999677583d7e9510a Mon Sep 17 00:00:00 2001 From: Sergey Grebnov Date: Thu, 19 Nov 2015 16:27:11 +0300 Subject: [PATCH 41/45] CB-7696 Document target=_self behavior for Windows github close #124 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f5c847d1d..e83dff1dd 100644 --- a/README.md +++ b/README.md @@ -172,6 +172,10 @@ opened with `target='_blank'`. The rules might look like these ### Windows Quirks +Windows 8.0, 8.1 and Windows Phone 8.1 don't support remote urls to be opened in the Cordova WebView so remote urls are always showed in the system's web browser if opened with `target='_self'`. + +On Windows 10 if the URL is NOT in the white list and is opened with `target='_self'` it will be showed in the system's web browser instead of InAppBrowser popup. + Similar to Firefox OS IAB window visual behaviour can be overridden via `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` CSS classes ### Browser Quirks From 52cfd3216a05edff9f5f00f66050cf9312b6a548 Mon Sep 17 00:00:00 2001 From: Connor Pearson Date: Tue, 17 Mar 2015 13:11:49 -0400 Subject: [PATCH 42/45] CB-3750: Fixes spinner on iOS. This closes #89 --- src/ios/CDVInAppBrowser.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index e52865040..28b1bd96f 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -508,15 +508,15 @@ - (void)createViews self.webView.scalesPageToFit = NO; self.webView.userInteractionEnabled = YES; - self.spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; + self.spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; self.spinner.alpha = 1.000; self.spinner.autoresizesSubviews = YES; - self.spinner.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin; + self.spinner.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin); self.spinner.clearsContextBeforeDrawing = NO; self.spinner.clipsToBounds = NO; self.spinner.contentMode = UIViewContentModeScaleToFill; - self.spinner.frame = CGRectMake(454.0, 231.0, 20.0, 20.0); - self.spinner.hidden = YES; + self.spinner.frame = CGRectMake(CGRectGetMidX(self.webView.frame), CGRectGetMidY(self.webView.frame), 20.0, 20.0); + self.spinner.hidden = NO; self.spinner.hidesWhenStopped = YES; self.spinner.multipleTouchEnabled = NO; self.spinner.opaque = NO; From 9b576f303b87f30b5054c47240c1e815415da374 Mon Sep 17 00:00:00 2001 From: Connor Pearson Date: Tue, 24 Feb 2015 13:48:14 -0500 Subject: [PATCH 43/45] CB-8534: Allow plugins to respond to onReceivedHttpAuthRequest. This closes #82 --- src/android/InAppBrowser.java | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index 60437451c..8487b6432 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -41,6 +41,7 @@ Licensed to the Apache Software Foundation (ASF) under one import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodManager; import android.webkit.CookieManager; +import android.webkit.HttpAuthHandler; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; @@ -52,6 +53,7 @@ Licensed to the Apache Software Foundation (ASF) under one import org.apache.cordova.CallbackContext; import org.apache.cordova.Config; import org.apache.cordova.CordovaArgs; +import org.apache.cordova.CordovaHttpAuthHandler; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.CordovaWebView; import org.apache.cordova.LOG; @@ -61,6 +63,7 @@ Licensed to the Apache Software Foundation (ASF) under one import org.json.JSONObject; import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.HashMap; import java.util.StringTokenizer; @@ -864,6 +867,39 @@ public void onReceivedError(WebView view, int errorCode, String description, Str Log.d(LOG_TAG, "Should never happen"); } } + + /** + * On received http auth request. + */ + @Override + public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) { + + // Check if there is some plugin which can resolve this auth challenge + PluginManager pluginManager = null; + try { + Method gpm = webView.getClass().getMethod("getPluginManager"); + pluginManager = (PluginManager)gpm.invoke(webView); + } catch (NoSuchMethodException e) { + } catch (IllegalAccessException e) { + } catch (InvocationTargetException e) { + } + + if (pluginManager == null) { + try { + Field pmf = webView.getClass().getField("pluginManager"); + pluginManager = (PluginManager)pmf.get(webView); + } catch (NoSuchFieldException e) { + } catch (IllegalAccessException e) { + } + } + + if (pluginManager != null && pluginManager.onReceivedHttpAuthRequest(webView, new CordovaHttpAuthHandler(handler), host, realm)) { + return; + } + + // By default handle 401 like we'd normally do! + super.onReceivedHttpAuthRequest(view, handler, host, realm); + } } } From 542536f7908a776ec49becb0bf40969ee4a48a82 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Fri, 20 Nov 2015 10:53:36 -0800 Subject: [PATCH 44/45] CB-10040 - re-fix: backwards compatible with cordova-ios < 4.0 --- src/ios/CDVInAppBrowser.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 28b1bd96f..72effaaf0 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -231,11 +231,18 @@ - (void)show:(CDVInvokedUrlCommand*)command - (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options { - NSURLRequest* request = [NSURLRequest requestWithURL:url]; + NSURLRequest* request = [NSURLRequest requestWithURL:url]; + #ifdef __CORDOVA_4_0_0 - [self.webViewEngine loadRequest:request]; + // the webview engine itself will filter for this according to policy + // in config.xml for cordova-ios-4.0 + [self.webViewEngine loadRequest:request]; #else + if ([self.commandDelegate URLIsWhitelisted:url]) { [self.webView loadRequest:request]; + } else { // this assumes the InAppBrowser can be excepted from the white-list + [self openInInAppBrowser:url withOptions:options]; + } #endif } From 290ea0ac9c832f8c0aa1b280f9d188dcd1680e72 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Mon, 30 Nov 2015 17:57:07 -0800 Subject: [PATCH 45/45] CB-10035 Incremented plugin version. --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index cba3e5f28..6591f4767 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "1.1.0", + "version": "1.1.1-dev", "description": "Cordova InAppBrowser Plugin", "cordova": { "id": "cordova-plugin-inappbrowser", diff --git a/plugin.xml b/plugin.xml index a05fddc7f..8e99dd6d1 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.1.1-dev"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index f4f3be361..0d2c021e7 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.1.1-dev"> Cordova InAppBrowser Plugin Tests Apache 2.0