whatsapp-api-fix

3.0.2 • Public • Published

Whatsapp api fix

This repository implement solution for firefox whatsapp break link

1. How to import

  1. Use gulp
gulp.task("whatsappFix", function () {
  gulp.src('./node_modules/whatsapp-api-fix/index.js')
    .pipe(gulp.dest("dist/"));
});
  1. Use gulp
<script async src="./node_modules/whatsapp-api-fix/index.js"></script>
  1. Or any other...

2. How to use

  1. Use funcion only number
var $wppFix = new WhatsappFix();

var params =  { number: 123456789 };
var redirect_whatsapp_link = $wppFix.getRedirect(params);

// > http://web.whatsapp.com/send?phone=123456789&text=
// > http://api.whatsapp.com/send?phone=123456789&text=
  1. Use funcion number and text
var $wppFix = new WhatsappFix();

var params =  { number: 123456789, text: 'text' };
var redirect_whatsapp_link = $wppFix.getRedirect(params);

// > http://web.whatsapp.com/send?phone=123456789&text=text
// > http://api.whatsapp.com/send?phone=123456789&text=text
  1. Use funcion to search in stackoverflow in case of error
    IN THIS CASE, A NEW TAB IS OPEN IN STACKOVERFLOW
var $wppFix = new WhatsappFix();

var params = { number: 123456789, text: 'text', search: true };
var redirect_whatsapp_link = $wppFix.getRedirect(params);

Readme

Keywords

none

Package Sidebar

Install

npm i whatsapp-api-fix

Weekly Downloads

1

Version

3.0.2

License

ISC

Unpacked Size

3.54 kB

Total Files

3

Last publish

Collaborators

  • marcius