Skip to content

Commit

Permalink
Fix whatsapp share on mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
ellisonleao committed Jan 24, 2022
1 parent 771f62c commit 4f3e58a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 25 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/npmpublish.yml

This file was deleted.

5 changes: 4 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ <h2>
</ul>
<p>Example:</p>

<button class="button" data-sharer="whatsapp" data-title="Checkout Sharer.js!" data-url="https://ellisonleao.github.io/sharer.js/">Share on Whatsapp</button>
<button class="button" data-sharer="whatsapp" data-web=true data-link=true data-blank=true data-title="Checkout Sharer.js!" data-url="https://ellisonleao.github.io/sharer.js/">Share on Whatsapp Web</button>
<br/>
<button class="button" data-sharer="whatsapp" data-link=true data-blank=true data-title="Checkout Sharer.js!" data-url="https://ellisonleao.github.io/sharer.js/">Share on Whatsapp</button>

</div>

<div class="component">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sharer.js",
"version": "0.5.0",
"version": "0.5.1",
"description": "Create your own social share buttons. No Jquery.",
"main": "sharer.js",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions sharer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Sharer.js
*
* @description Create your own social share buttons
* @version 0.5.0
* @version 0.5.1
* @author Ellison Leao <ellisonleao@gmail.com>
* @license MIT
*
Expand Down Expand Up @@ -104,7 +104,7 @@
},
},
whatsapp: {
shareUrl: this.getValue('web') === 'true' ? 'https://web.whatsapp.com/send' : 'https://api.whatsapp.com/',
shareUrl: this.getValue('web') === 'true' ? 'https://web.whatsapp.com/send' : 'https://wa.me/',
params: {
phone: this.getValue('to'),
text: this.getValue('title') + ' ' + this.getValue('url'),
Expand Down
2 changes: 1 addition & 1 deletion sharer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4f3e58a

Please sign in to comment.