Socket
Socket
Sign inDemoInstall

cordova-plugin-x-toast

Package Overview
Dependencies
0
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.2 to 2.5.0

2

package.json
{
"name": "cordova-plugin-x-toast",
"version": "2.4.2",
"version": "2.5.0",
"description": "This plugin allows you to show a Toast. A Toast is a little non intrusive buttonless popup which automatically disappears.",

@@ -5,0 +5,0 @@ "cordova": {

@@ -5,3 +5,6 @@ # PhoneGap Toast plugin

[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=eddyverbruggen%40gmail%2ecom&lc=US&item_name=cordova%2dplugin%2dtoast&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)
If you like this plugin and want to say thanks please send a PR or donation. Both are equally appreciated!
<table width="100%">

@@ -142,3 +145,3 @@ <tr>

* show(message, duration, position)
* duration: 'short', 'long'
* duration: 'short', 'long', '3000', 900 (the latter are milliseconds)
* position: 'top', 'center', 'bottom'

@@ -169,3 +172,3 @@

message: "hey there",
duration: "short",
duration: "short", // which is 2000 ms. "long" is 4000. Or specify the nr of ms yourself.
position: "bottom",

@@ -199,6 +202,6 @@ addPixelsY: -40 // added a negative value to move it up a bit (default 0)

message: "hey there",
duration: "short",
duration: 1500, // ms
position: "bottom",
addPixelsY: -40, // (optional) added a negative value to move it up a bit (default 0)
data: {'foo','bar'} // (optional) pass in a JSON object here (it will be sent back in the success callback below)
data: {'foo':'bar'} // (optional) pass in a JSON object here (it will be sent back in the success callback below)
},

@@ -228,3 +231,3 @@ // implement the success callback

message: "hey there",
duration: "short",
duration: "short", // 2000 ms
position: "bottom",

@@ -259,2 +262,3 @@ styling: {

## 6. CHANGELOG
- 2.5.0: By popular demand: Specify the duration of the Toast on iOS and Android. Pass in `short` (2000ms), `long` (4000ms), or any nr of milliseconds: `900`.
- 2.4.2: You can now also set the Toast `opacity` for iOS.

@@ -261,0 +265,0 @@ - 2.4.1: As an addition to 2.4.0, [Sino](https://github.com/SinoBoeckmann) added the option to change the text color!

@@ -14,3 +14,3 @@ function Toast() {

withMessage: function(m) {
message = m;
message = m.toString();
return this;

@@ -20,3 +20,3 @@ },

withDuration: function(d) {
duration = d;
duration = d.toString();
return this;

@@ -48,2 +48,4 @@ },

Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) {
options.duration = (options.duration === undefined ? 'long' : options.duration.toString());
options.message = options.message.toString();
cordova.exec(successCallback, errorCallback, "Toast", "show", [options]);

@@ -50,0 +52,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc