From fa08a29308ce0efcb06340352d95b2a7fd3864f9 Mon Sep 17 00:00:00 2001 From: Gabriel Fiocchi Date: Thu, 26 Jan 2017 10:12:02 -0300 Subject: [PATCH 1/6] Add method addDefaultShareMenuItem for Android --- CONTRIBUTORS | 1 + plugin/src/android/BrowserTab.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 978494b..7b12591 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -10,3 +10,4 @@ Iain McGinniss William Denniss Rahul Ravikumar Zachary Cardoza +Gabriel Fiocchi diff --git a/plugin/src/android/BrowserTab.java b/plugin/src/android/BrowserTab.java index 5f8e56a..a6044df 100644 --- a/plugin/src/android/BrowserTab.java +++ b/plugin/src/android/BrowserTab.java @@ -101,7 +101,9 @@ private void openUrl(JSONArray args, CallbackContext callbackContext) { callbackContext.error("no in app browser tab implementation available"); } - Intent customTabsIntent = new CustomTabsIntent.Builder().build().intent; + CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); + builder.addDefaultShareMenuItem(); + Intent customTabsIntent = builder.build().intent; customTabsIntent.setData(Uri.parse(urlStr)); customTabsIntent.setPackage(mCustomTabsBrowser); cordova.getActivity().startActivity(customTabsIntent); From 9e840637f880d6a72d461341a619b560c94e9627 Mon Sep 17 00:00:00 2001 From: Gabriel Fiocchi Date: Thu, 26 Jan 2017 11:55:11 -0300 Subject: [PATCH 2/6] Add Custom toolbarcolor for Android --- plugin/src/android/BrowserTab.java | 13 +++++++++++++ plugin/www/browsertab.js | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/plugin/src/android/BrowserTab.java b/plugin/src/android/BrowserTab.java index a6044df..65223a3 100644 --- a/plugin/src/android/BrowserTab.java +++ b/plugin/src/android/BrowserTab.java @@ -53,6 +53,7 @@ public class BrowserTab extends CordovaPlugin { private boolean mFindCalled = false; private String mCustomTabsBrowser; + private String toolbarColor = "#ffffff"; @Override public boolean execute(String action, JSONArray args, CallbackContext callbackContext) { @@ -95,6 +96,17 @@ private void openUrl(JSONArray args, CallbackContext callbackContext) { return; } + JSONObject themeableArgs; + try { + themeableArgs = new JSONObject(args.optString(1)); + if (themeableArgs.getString("statusBarColor") != null) { + Log.d( LOG_TAG, "soy arg " + args.optString(1) ); + toolbarColor = themeableArgs.getString("statusBarColor"); + } + } catch (JSONException e) { + Log.d(LOG_TAG, "openUrl themeableArgs: failed to parse theme parameters" + args); + } + String customTabsBrowser = findCustomTabBrowser(); if (customTabsBrowser == null) { Log.d(LOG_TAG, "openUrl: no in app browser tab available"); @@ -102,6 +114,7 @@ private void openUrl(JSONArray args, CallbackContext callbackContext) { } CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); + builder.setToolbarColor( Color.parseColor(toolbarColor)); builder.addDefaultShareMenuItem(); Intent customTabsIntent = builder.build().intent; customTabsIntent.setData(Uri.parse(urlStr)); diff --git a/plugin/www/browsertab.js b/plugin/www/browsertab.js index 1157b2d..7f57e30 100644 --- a/plugin/www/browsertab.js +++ b/plugin/www/browsertab.js @@ -18,10 +18,11 @@ exports.isAvailable = function(success, error) { exec(success, error, 'BrowserTab', 'isAvailable', []); }; -exports.openUrl = function(url, opt_error) { +exports.openUrl = function(url, themeableBrowser, opt_error) { var doNothing = function() {}; var error = (!opt_error) ? doNothing : opt_error; - exec(doNothing, error, 'BrowserTab', 'openUrl', [url]); + themeableBrowser = themeableBrowser || {}; + exec(doNothing, error, 'BrowserTab', 'openUrl', [url, themeableBrowser]); }; exports.close = function(opt_error) { From 1d09caf7e52a22b553cb73b16e24befb6f6939df Mon Sep 17 00:00:00 2001 From: Gabriel Fiocchi Date: Fri, 27 Jan 2017 01:06:04 -0300 Subject: [PATCH 3/6] Add toolbarColor on iOS --- plugin/README.md | 8 +++++++- plugin/src/android/BrowserTab.java | 4 ++-- plugin/src/ios/CBTBrowserTab.m | 31 ++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/plugin/README.md b/plugin/README.md index 4b7de53..b15aabe 100644 --- a/plugin/README.md +++ b/plugin/README.md @@ -15,10 +15,16 @@ on iOS. ## Usage -To open a URL in an in-app browser tab on a compatible platform: +To open a URL in an in-app browser tab on a compatible platform with Default theme: cordova.plugins.browsertab.openUrl('https://www.google.com'); +To open a URL in an in-app browser tab on a compatible platform with Custom theme (iOS and Android): + + cordova.plugins.browsertab.openUrl('https://www.google.com', {toolbarColor:"#000000"}); + +toolbarColor: works only with Hexa. + This plugin is designed to complement cordova-plugin-inappbrowser. No fallback is triggered automatically, you need to test whether it will succeed, and then perform your own fallback logic like opening the link in the system browser diff --git a/plugin/src/android/BrowserTab.java b/plugin/src/android/BrowserTab.java index 65223a3..31d95ed 100644 --- a/plugin/src/android/BrowserTab.java +++ b/plugin/src/android/BrowserTab.java @@ -99,9 +99,9 @@ private void openUrl(JSONArray args, CallbackContext callbackContext) { JSONObject themeableArgs; try { themeableArgs = new JSONObject(args.optString(1)); - if (themeableArgs.getString("statusBarColor") != null) { + if (themeableArgs.getString("toolbarColor") != null) { Log.d( LOG_TAG, "soy arg " + args.optString(1) ); - toolbarColor = themeableArgs.getString("statusBarColor"); + toolbarColor = themeableArgs.getString("toolbarColor"); } } catch (JSONException e) { Log.d(LOG_TAG, "openUrl themeableArgs: failed to parse theme parameters" + args); diff --git a/plugin/src/ios/CBTBrowserTab.m b/plugin/src/ios/CBTBrowserTab.m index 233ae18..f7c2a82 100644 --- a/plugin/src/ios/CBTBrowserTab.m +++ b/plugin/src/ios/CBTBrowserTab.m @@ -15,6 +15,7 @@ */ #import "CBTBrowserTab.h" +#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) @implementation CBTBrowserTab { SFSafariViewController *_safariViewController; @@ -29,6 +30,7 @@ - (void)isAvailable:(CDVInvokedUrlCommand *)command { - (void)openUrl:(CDVInvokedUrlCommand *)command { NSString *urlString = command.arguments[0]; + NSDictionary* themeableArgs = [command argumentAtIndex:1]; if (urlString == nil) { CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"url can't be empty"]; @@ -45,6 +47,12 @@ - (void)openUrl:(CDVInvokedUrlCommand *)command { } _safariViewController = [[SFSafariViewController alloc] initWithURL:url]; + if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"10.0")) { + sfvc.preferredBarTintColor = [self colorFromRGBA: [themeableArgs objectForKey:@"toolbarColor"] ?: @"#ffffff"]; + } else { + sfvc.view.tintColor = [self colorFromRGBA: [themeableArgs objectForKey:@"toolbarColor"] ?: @"#ffffff"]; + } + [self.viewController presentViewController:_safariViewController animated:YES completion:nil]; CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; @@ -59,4 +67,27 @@ - (void)close:(CDVInvokedUrlCommand *)command { _safariViewController = nil; } +- (UIColor *)colorFromRGBA:(NSString *)rgba { + unsigned rgbaVal = 0; + + if ([[rgba substringWithRange:NSMakeRange(0, 1)] isEqualToString:@"#"]) { + // First char is #, get rid of that. + rgba = [rgba substringFromIndex:1]; + } + + if (rgba.length < 8) { + // If alpha is not given, just append ff. + rgba = [NSString stringWithFormat:@"%@ff", rgba]; + } + + NSScanner *scanner = [NSScanner scannerWithString:rgba]; + [scanner setScanLocation:0]; + [scanner scanHexInt:&rgbaVal]; + + return [UIColor colorWithRed:(rgbaVal >> 24 & 0xFF) / 255.0f + green:(rgbaVal >> 16 & 0xFF) / 255.0f + blue:(rgbaVal >> 8 & 0xFF) / 255.0f + alpha:(rgbaVal & 0xFF) / 255.0f]; +} + @end From 825dbe75f34447f8bf7c975566d6ae11308ebee6 Mon Sep 17 00:00:00 2001 From: Gabriel Fiocchi Date: Fri, 27 Jan 2017 01:24:06 -0300 Subject: [PATCH 4/6] Fix android dependency missing. Fix ios controller. --- plugin/src/android/BrowserTab.java | 1 + plugin/src/ios/CBTBrowserTab.m | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/src/android/BrowserTab.java b/plugin/src/android/BrowserTab.java index 31d95ed..a8cde77 100644 --- a/plugin/src/android/BrowserTab.java +++ b/plugin/src/android/BrowserTab.java @@ -17,6 +17,7 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; +import android.graphics.Color; import android.net.Uri; import android.support.customtabs.CustomTabsIntent; import android.util.Log; diff --git a/plugin/src/ios/CBTBrowserTab.m b/plugin/src/ios/CBTBrowserTab.m index f7c2a82..d95b967 100644 --- a/plugin/src/ios/CBTBrowserTab.m +++ b/plugin/src/ios/CBTBrowserTab.m @@ -48,9 +48,9 @@ - (void)openUrl:(CDVInvokedUrlCommand *)command { _safariViewController = [[SFSafariViewController alloc] initWithURL:url]; if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"10.0")) { - sfvc.preferredBarTintColor = [self colorFromRGBA: [themeableArgs objectForKey:@"toolbarColor"] ?: @"#ffffff"]; + _safariViewController.preferredBarTintColor = [self colorFromRGBA: [themeableArgs objectForKey:@"toolbarColor"] ?: @"#ffffff"]; } else { - sfvc.view.tintColor = [self colorFromRGBA: [themeableArgs objectForKey:@"toolbarColor"] ?: @"#ffffff"]; + _safariViewController.view.tintColor = [self colorFromRGBA: [themeableArgs objectForKey:@"toolbarColor"] ?: @"#ffffff"]; } [self.viewController presentViewController:_safariViewController animated:YES completion:nil]; From 3d13d63eed6dd00cf749ac4069b08edfe97a4dd5 Mon Sep 17 00:00:00 2001 From: Gabriel Fiocchi Date: Fri, 27 Jan 2017 11:45:08 -0300 Subject: [PATCH 5/6] Register cordova-plugin-browsertab-themeable --- AUTHORS | 8 -- CONTRIBUTING.md | 28 ----- CONTRIBUTORS | 13 --- README.md | 101 +++++++++++++++++- package.json | 23 ++++ plugin/plugin.xml => plugin.xml | 16 ++- plugin/README.md | 89 --------------- plugin/package.json | 19 ---- {plugin/src => src}/android/BrowserTab.gradle | 0 {plugin/src => src}/android/BrowserTab.java | 2 +- {plugin/src => src}/ios/CBTBrowserTab.h | 0 {plugin/src => src}/ios/CBTBrowserTab.m | 0 {plugin/www => www}/browsertab.js | 0 13 files changed, 131 insertions(+), 168 deletions(-) delete mode 100644 AUTHORS delete mode 100644 CONTRIBUTING.md delete mode 100644 CONTRIBUTORS mode change 120000 => 100644 README.md create mode 100644 package.json rename plugin/plugin.xml => plugin.xml (72%) delete mode 100644 plugin/README.md delete mode 100644 plugin/package.json rename {plugin/src => src}/android/BrowserTab.gradle (100%) rename {plugin/src => src}/android/BrowserTab.java (99%) rename {plugin/src => src}/ios/CBTBrowserTab.h (100%) rename {plugin/src => src}/ios/CBTBrowserTab.m (100%) rename {plugin/www => www}/browsertab.js (100%) diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 04fd26b..0000000 --- a/AUTHORS +++ /dev/null @@ -1,8 +0,0 @@ -# This is the official list of authors for copyright purposes. -# This file is distinct from the CONTRIBUTORS files. -# See the latter for an explanation. -# Names should be added to this file as: -# Name or Organization -# The email address is not required for organizations. - -Google Inc. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 1086825..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,28 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at -the end). - -### Before you contribute -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement] -(https://cla.developers.google.com/about/google-individual) -(CLA), which you can do online. The CLA is necessary mainly because you own the -copyright to your changes, even after your contribution becomes part of our -codebase, so we need your permission to use and distribute your code. We also -need to be sure of various other things—for instance that you'll tell us if you -know that your code infringes on other people's patents. You don't have to sign -the CLA until after you've submitted your code for review and a member has -approved it, but you must do it before we can put your code into our codebase. -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -### Code reviews -All submissions, including submissions by project members, require review. We -use Github pull requests for this purpose. - -### The small print -Contributions made by corporations are covered by a different agreement than -the one above, the -[Software Grant and Corporate Contributor License Agreement] -(https://cla.developers.google.com/about/google-corporate). diff --git a/CONTRIBUTORS b/CONTRIBUTORS deleted file mode 100644 index 7b12591..0000000 --- a/CONTRIBUTORS +++ /dev/null @@ -1,13 +0,0 @@ -# People who have agreed to one of the CLAs and can contribute patches. -# The AUTHORS file lists the copyright holders; this file -# lists people. For example, Google employees are listed here -# but not in AUTHORS, because Google holds the copyright. -# -# Names should be added to this file as: -# Name - -Iain McGinniss -William Denniss -Rahul Ravikumar -Zachary Cardoza -Gabriel Fiocchi diff --git a/README.md b/README.md deleted file mode 120000 index 8d8b3d0..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -plugin/README.md \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..118f916 --- /dev/null +++ b/README.md @@ -0,0 +1,100 @@ +# cordova-plugin-browsertab-themeable + +Note: This is not an official Google product. + +## Supported Platforms + +- __Android__ +- __iOS__ + +## Installation + +Execute from the projects root folder: + $ cordova plugin add cordova-plugin-browsertab-themeable + +## About + +This plugin provides an interface to in-app browser tabs that exist on some +mobile platforms, specifically +[Custom Tabs](http://developer.android.com/tools/support-library/features.html#custom-tabs) +on Android (including the +[Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) +implementation), and +[SFSafariViewController](https://developer.apple.com/library/ios/documentation/SafariServices/Reference/SFSafariViewController_Ref/) +on iOS. + +## Usage + +To open a URL in an in-app browser tab on a compatible platform with Default theme: + + cordova.plugins.browsertab.themeable.openUrl('https://www.google.com'); + +To open a URL in an in-app browser tab on a compatible platform with Custom theme: + + cordova.plugins.browsertab.themeable.openUrl('https://www.google.com', {toolbarColor:"#000000"}); + +toolbarColor: works only with Hexa. + +This plugin is designed to complement cordova-plugin-inappbrowser. No fallback +is triggered automatically, you need to test whether it will succeed, and then +perform your own fallback logic like opening the link in the system browser +instead using cordova-plugin-inappbrowser. + + cordova.InAppBrowser.open('https://www.google.com/', '_system'); + +Complete example with fallback handling: + + var testURL = 'https://www.google.com'; + + document.querySelector("#tabwithfallback").addEventListener('click', function(ev) { + cordova.plugins.browsertab.isAvailable(function(result) { + if (!result) { + cordova.InAppBrowser.open(testURL, '_system'); + } else { + cordova.plugins.browsertab.openUrl( + testURL, + function(successResp) {}, + function(failureResp) { + error.textContent = "failed to launch browser tab"; + error.style.display = ''; + }); + } + }, + function(isAvailableError) { + error.textContent = "failed to query availability of in-app browser tab"; + error.style.display = ''; + }); + }); + + \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..3eabc11 --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "cordova-plugin-browsertab-themeable", + "version": "0.2.1", + "description": "In-app browser tabs for Android and iOS it's a forke modify of cordova-plugin-browsertab", + "cordova": { + "id": "cordova-plugin-browsertab-themeable", + "platforms": [ + "android", + "ios" + ] + }, + "keywords": [ + "sfsafariviewcontroller", + "custom-tabs", + "browser-tabs", + "browser", + "browsertab", + "in-app-browser", + "inappbrowser" + ], + "author": "Gabriel Fiocchi", + "license": "Apache-2.0" +} diff --git a/plugin/plugin.xml b/plugin.xml similarity index 72% rename from plugin/plugin.xml rename to plugin.xml index 865ae43..3e41308 100644 --- a/plugin/plugin.xml +++ b/plugin.xml @@ -2,29 +2,27 @@ - cordova-plugin-browsertab + id="cordova-plugin-browsertab-themeable" + version="0.2.1"> + cordova-plugin-browsertab-themeable - This plugin provides an interface to in-app browser tabs that exist on - some mobile platforms, specifically Custom Tabs on Android and - SFSafariViewController on iOS. + This plugin provides an interface to in-app browser tabs that exist on some mobile platforms, specifically Custom Tabs on Android and SFSafariViewController on iOS it's a forke modify of cordova-plugin-browsertab. - + + value="com.gabfiocchi.cordova.plugin.browsertab.BrowserTab" /> + target-dir="src/com/gabfiocchi/cordova/plugin" /> diff --git a/plugin/README.md b/plugin/README.md deleted file mode 100644 index b15aabe..0000000 --- a/plugin/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# cordova-plugin-browsertab - -Note: This is not an official Google product. - -## About - -This plugin provides an interface to in-app browser tabs that exist on some -mobile platforms, specifically -[Custom Tabs](http://developer.android.com/tools/support-library/features.html#custom-tabs) -on Android (including the -[Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) -implementation), and -[SFSafariViewController](https://developer.apple.com/library/ios/documentation/SafariServices/Reference/SFSafariViewController_Ref/) -on iOS. - -## Usage - -To open a URL in an in-app browser tab on a compatible platform with Default theme: - - cordova.plugins.browsertab.openUrl('https://www.google.com'); - -To open a URL in an in-app browser tab on a compatible platform with Custom theme (iOS and Android): - - cordova.plugins.browsertab.openUrl('https://www.google.com', {toolbarColor:"#000000"}); - -toolbarColor: works only with Hexa. - -This plugin is designed to complement cordova-plugin-inappbrowser. No fallback -is triggered automatically, you need to test whether it will succeed, and then -perform your own fallback logic like opening the link in the system browser -instead using cordova-plugin-inappbrowser. - - cordova.InAppBrowser.open('https://www.google.com/', '_system'); - -Complete example with fallback handling: - - var testURL = 'https://www.google.com'; - - document.querySelector("#tabwithfallback").addEventListener('click', function(ev) { - cordova.plugins.browsertab.isAvailable(function(result) { - if (!result) { - cordova.InAppBrowser.open(testURL, '_system'); - } else { - cordova.plugins.browsertab.openUrl( - testURL, - function(successResp) {}, - function(failureResp) { - error.textContent = "failed to launch browser tab"; - error.style.display = ''; - }); - } - }, - function(isAvailableError) { - error.textContent = "failed to query availability of in-app browser tab"; - error.style.display = ''; - }); - }); - -## Building - -Install Cordova if you haven't already: - - npm install -g cordova - -Then from the root directory: - - cd demo - cordova platform add ios - cordova run ios - cordova platform add android - cordova run android - -## Development - -During development if you want to make changes to the plugin you need to force -a rebuild and add the plugin from source, like so (from the demo directory): - - cordova plugin remove cordova-plugin-browsertab - cordova plugin add ../plugin - -To refresh the platform build: - - cordova platform remove ios - cordova platform add ios - -To set breakpoints, etc, open the project in the code editor: - - cordova platform add ios - open platforms/ios/BrowserTabDemo.xcworkspace diff --git a/plugin/package.json b/plugin/package.json deleted file mode 100644 index a9923a9..0000000 --- a/plugin/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "cordova-plugin-browsertab", - "version": "0.2.0", - "description": "In-app browser tabs for Android and iOS", - "cordova": { - "id": "cordova-plugin-browsertab", - "platforms": [ - "android" - ] - }, - "keywords": [ - "sfsafariviewcontroller", - "custom-tabs", - "browser-tabs", - "browser" - ], - "author": "Google, Inc.", - "license": "Apache-2.0" -} diff --git a/plugin/src/android/BrowserTab.gradle b/src/android/BrowserTab.gradle similarity index 100% rename from plugin/src/android/BrowserTab.gradle rename to src/android/BrowserTab.gradle diff --git a/plugin/src/android/BrowserTab.java b/src/android/BrowserTab.java similarity index 99% rename from plugin/src/android/BrowserTab.java rename to src/android/BrowserTab.java index a8cde77..f8f05c4 100644 --- a/plugin/src/android/BrowserTab.java +++ b/src/android/BrowserTab.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package com.google.cordova.plugin.browsertab; +package com.gabfiocchi.cordova.plugin.browsertab; import android.content.Intent; import android.content.pm.PackageManager; diff --git a/plugin/src/ios/CBTBrowserTab.h b/src/ios/CBTBrowserTab.h similarity index 100% rename from plugin/src/ios/CBTBrowserTab.h rename to src/ios/CBTBrowserTab.h diff --git a/plugin/src/ios/CBTBrowserTab.m b/src/ios/CBTBrowserTab.m similarity index 100% rename from plugin/src/ios/CBTBrowserTab.m rename to src/ios/CBTBrowserTab.m diff --git a/plugin/www/browsertab.js b/www/browsertab.js similarity index 100% rename from plugin/www/browsertab.js rename to www/browsertab.js From 5887da95e3ca17760c4cb18d8d79a50bf1b9b57b Mon Sep 17 00:00:00 2001 From: Gabriel Fiocchi Date: Fri, 27 Jan 2017 12:02:03 -0300 Subject: [PATCH 6/6] update readme.md --- README.md | 47 +++++++++++++---------------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 118f916..38b1c49 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,19 @@ Note: This is not an official Google product. ## Installation Execute from the projects root folder: + ``` $ cordova plugin add cordova-plugin-browsertab-themeable + ``` + +Or install a specific version: + ``` + $ cordova plugin add cordova-plugin-browsertab-themeable@VERSION + ``` + +Or install the latest head version: + ``` + $ cordova plugin add https://github.com/gabfiocchi/cordova-plugin-browsertab.git + ``` ## About @@ -64,37 +76,4 @@ Complete example with fallback handling: error.textContent = "failed to query availability of in-app browser tab"; error.style.display = ''; }); - }); - - \ No newline at end of file + }); \ No newline at end of file