Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 0b9eb35

Browse files
author
kriskbx
committed
modified readme, updated test.html to use the current button-path
1 parent 319f4bd commit 0b9eb35

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

README.md

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
# WhatsApp sharing button
22

3-
This is the buttons source code of this awesome webservice: http://whatsapp-sharing.com
3+
## Installation
44

5-
### Get started
5+
### 1. Download
66

7-
`git clone https://github.com/kriskbx/whatsapp-sharing.git whatsapp-sharing`
7+
Download the current [release](https://github.com/kriskbx/whatsapp-sharing/releases) or clone the repo and upload `dist/whatsapp-button.js` somewhere on your webserver.
88

9-
`cd whatsapp-sharing`
9+
### 2. Integrate the buttons source
1010

11-
`npm install`
11+
Use this code right before the `</body>`, replace `http://your-domain.tld/path/whatsapp-button.js` with the url to the just uploaded file.
1212

13-
### Build the button
13+
<script type="text/javascript"> if(typeof wabtn4fg==="undefined") {wabtn4fg=1;h=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");s.type="text/javascript";s.src="http://your-domain.tld/path/whatsapp-button.js";h.appendChild(s)}</script>
1414

15-
Just run `grunt` and look into "dist".
15+
### 3. Place it on your website
1616

17-
### Use the button
18-
19-
If you want to use the button yourself, just use this code:
17+
Place this code somewhere on your website to display the button:
2018

2119
<a href="whatsapp://send" data-text="Take a look at this awesome website:" data-href="" class="wa_btn wa_btn_s" style="display:none">Share</a>
22-
23-
and
24-
25-
<script type="text/javascript"> if(typeof wabtn4fg==="undefined") {wabtn4fg=1;h=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");s.type="text/javascript";s.src="http://your-domain.tld/path/button";h.appendChild(s)}</script>
20+
21+
If you want to customize the size, style, url or the sharing text, feel free to visit [whatsapp-sharing.com](http://www.whatsapp-sharing.com) for a code generator.

test/test.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<title>WABTN Tester</title>
8-
<script type="text/javascript" src="../dist/button"></script>
8+
<script type="text/javascript" src="../dist/whatsapp-button.js"></script>
99
</head>
1010
<body>
1111

0 commit comments

Comments
 (0)