Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6211dd65ac |
@@ -138,7 +138,6 @@ instance, or the system browser.
|
||||
- __closebuttoncaption__: set to a string to use as the __Done__ button's caption. Note that you need to localize this value yourself.
|
||||
- __disallowoverscroll__: Set to `yes` or `no` (default is `no`). Turns on/off the UIWebViewBounce property.
|
||||
- __hidenavigationbuttons__: set to `yes` or `no` to turn the toolbar navigation buttons on or off (defaults to `no`). Only applicable if toolbar is not disabled.
|
||||
- __navigationbuttoncolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default color. Only applicable if navigation buttons are visible.
|
||||
- __toolbar__: set to `yes` or `no` to turn the toolbar on or off for the InAppBrowser (defaults to `yes`)
|
||||
- __toolbarcolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default color of the toolbar. Only applicable if toolbar is not disabled.
|
||||
- __toolbartranslucent__: set to `yes` or `no` to make the toolbar translucent(semi-transparent) (defaults to `yes`). Only applicable if toolbar is not disabled.
|
||||
@@ -150,7 +149,6 @@ instance, or the system browser.
|
||||
- __presentationstyle__: Set to `pagesheet`, `formsheet` or `fullscreen` to set the [presentation style](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (defaults to `fullscreen`).
|
||||
- __transitionstyle__: Set to `fliphorizontal`, `crossdissolve` or `coververtical` to set the [transition style](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (defaults to `coververtical`).
|
||||
- __toolbarposition__: Set to `top` or `bottom` (default is `bottom`). Causes the toolbar to be at the top or bottom of the window.
|
||||
- __hidespinner__: Set to `yes` or `no` to change the visibility of the loading indicator (defaults to `no`).
|
||||
|
||||
Windows supports these additional options:
|
||||
|
||||
|
||||
@@ -20,13 +20,6 @@
|
||||
-->
|
||||
# Release Notes
|
||||
|
||||
### 3.0.0 (Apr 12, 2018)
|
||||
* [CB-13659](https://issues.apache.org/jira/browse/CB-13659) **iOS** Add hidespinner option
|
||||
* In file `AppBrowser.java`: New code within `shouldOverrideUrlLoading()` to check for whitelisting custom schemes via a new `AllowedSchemes` preference configuration item. Allows custom schemes like `mycoolapp://` or `wevotetwitterscheme://`
|
||||
* `InAppBrowser.java`: New method `isURLWhileListed` to check for whitelisting of `AllowedSchemes` in a new preference configuration item. There is a new check in `shouldOverrideUrlLoading`, to allow whitelisted custom schemes like "mycoolapp://"
|
||||
* Add customisation of the navigation buttons for **iOS**
|
||||
* Fix navigation buttons on **iOS**
|
||||
|
||||
### 2.0.2 (Jan 24, 2018)
|
||||
* [CB-13791](https://issues.apache.org/jira/browse/CB-13791) Add **Android** support for a footer close button
|
||||
* [CB-13409](https://issues.apache.org/jira/browse/CB-13409) restore gitignore to default
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cordova-plugin-inappbrowser",
|
||||
"version": "3.0.0",
|
||||
"version": "2.0.2",
|
||||
"description": "Cordova InAppBrowser Plugin",
|
||||
"types": "./types/index.d.ts",
|
||||
"cordova": {
|
||||
@@ -42,7 +42,7 @@
|
||||
"0.2.3": {
|
||||
"cordova": ">=3.1.0"
|
||||
},
|
||||
"4.0.0": {
|
||||
"3.0.0": {
|
||||
"cordova": ">100"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||
id="cordova-plugin-inappbrowser"
|
||||
version="3.0.0">
|
||||
version="2.0.2">
|
||||
|
||||
<name>InAppBrowser</name>
|
||||
<description>Cordova InAppBrowser Plugin</description>
|
||||
|
||||
@@ -133,7 +133,6 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
private boolean hideUrlBar = false;
|
||||
private boolean showFooter = false;
|
||||
private String footerColor = "";
|
||||
private String[] allowedSchemes;
|
||||
|
||||
/**
|
||||
* Executes the request and returns PluginResult.
|
||||
@@ -1111,29 +1110,6 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
LOG.e(LOG_TAG, "Error sending sms " + url + ":" + e.toString());
|
||||
}
|
||||
}
|
||||
// Test for whitelisted custom scheme names like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response)
|
||||
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]*://.*?$")) {
|
||||
if (allowedSchemes == null) {
|
||||
String allowed = preferences.getString("AllowedSchemes", "");
|
||||
allowedSchemes = allowed.split(",");
|
||||
}
|
||||
if (allowedSchemes != null) {
|
||||
for (String scheme : allowedSchemes) {
|
||||
if (url.startsWith(scheme)) {
|
||||
try {
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put("type", "customscheme");
|
||||
obj.put("url", url);
|
||||
sendUpdate(obj, true);
|
||||
return true;
|
||||
} catch (JSONException ex) {
|
||||
LOG.e(LOG_TAG, "Custom Scheme URI passed in has caused a JSON error.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1256,4 +1232,4 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
super.onReceivedHttpAuthRequest(view, handler, host, realm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,10 +54,8 @@
|
||||
@property (nonatomic, copy) NSString* toolbarcolor;
|
||||
@property (nonatomic, assign) BOOL toolbartranslucent;
|
||||
@property (nonatomic, assign) BOOL hidenavigationbuttons;
|
||||
@property (nonatomic, copy) NSString* navigationbuttoncolor;
|
||||
@property (nonatomic, assign) BOOL clearcache;
|
||||
@property (nonatomic, assign) BOOL clearsessioncache;
|
||||
@property (nonatomic, assign) BOOL hidespinner;
|
||||
|
||||
@property (nonatomic, copy) NSString* presentationstyle;
|
||||
@property (nonatomic, copy) NSString* transitionstyle;
|
||||
|
||||
@@ -642,17 +642,11 @@
|
||||
self.forwardButton = [[UIBarButtonItem alloc] initWithTitle:frontArrowString style:UIBarButtonItemStylePlain target:self action:@selector(goForward:)];
|
||||
self.forwardButton.enabled = YES;
|
||||
self.forwardButton.imageInsets = UIEdgeInsetsZero;
|
||||
if (_browserOptions.navigationbuttoncolor != nil) { // Set button color if user sets it in options
|
||||
self.forwardButton.tintColor = [self colorFromHexString:_browserOptions.navigationbuttoncolor];
|
||||
}
|
||||
|
||||
NSString* backArrowString = NSLocalizedString(@"◄", nil); // create arrow from Unicode char
|
||||
self.backButton = [[UIBarButtonItem alloc] initWithTitle:backArrowString style:UIBarButtonItemStylePlain target:self action:@selector(goBack:)];
|
||||
self.backButton.enabled = YES;
|
||||
self.backButton.imageInsets = UIEdgeInsetsZero;
|
||||
if (_browserOptions.navigationbuttoncolor != nil) { // Set button color if user sets it in options
|
||||
self.backButton.tintColor = [self colorFromHexString:_browserOptions.navigationbuttoncolor];
|
||||
}
|
||||
|
||||
// Filter out Navigation Buttons if user requests so
|
||||
if (_browserOptions.hidenavigationbuttons) {
|
||||
@@ -660,6 +654,7 @@
|
||||
} else {
|
||||
[self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]];
|
||||
}
|
||||
[self.toolbar setItems:@[self.closeButton, flexibleSpaceButton]];
|
||||
|
||||
self.view.backgroundColor = [UIColor grayColor];
|
||||
[self.view addSubview:self.toolbar];
|
||||
@@ -917,10 +912,7 @@
|
||||
self.backButton.enabled = theWebView.canGoBack;
|
||||
self.forwardButton.enabled = theWebView.canGoForward;
|
||||
|
||||
NSLog(_browserOptions.hidespinner ? @"Yes" : @"No");
|
||||
if(!_browserOptions.hidespinner) {
|
||||
[self.spinner startAnimating];
|
||||
}
|
||||
[self.spinner startAnimating];
|
||||
|
||||
return [self.navigationDelegate webViewDidStartLoad:theWebView];
|
||||
}
|
||||
@@ -1020,7 +1012,6 @@
|
||||
self.toolbarposition = kInAppBrowserToolbarBarPositionBottom;
|
||||
self.clearcache = NO;
|
||||
self.clearsessioncache = NO;
|
||||
self.hidespinner = NO;
|
||||
|
||||
self.enableviewportscale = NO;
|
||||
self.mediaplaybackrequiresuseraction = NO;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||
id="cordova-plugin-inappbrowser-tests"
|
||||
version="3.0.0">
|
||||
version="2.0.2">
|
||||
<name>Cordova InAppBrowser Plugin Tests</name>
|
||||
<license>Apache 2.0</license>
|
||||
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
'loadstart': channel.create('loadstart'),
|
||||
'loadstop': channel.create('loadstop'),
|
||||
'loaderror': channel.create('loaderror'),
|
||||
'exit': channel.create('exit'),
|
||||
'customscheme': channel.create('customscheme')
|
||||
'exit': channel.create('exit')
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user