Read more: http://bit.ly/18Wq01O
A Pen by Ibrahim Jabbari on CodePen.
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width = device-width,initial-scale = 1.0"> | |
| <title>Web Share API + AddThis Sharing Buttons</title> | |
| <meta name="description" content="Learn how to use Web Share API with conditional AddThis Sharing Buttons"> | |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous"> | |
| <button id="shareButton" onclick="share(this)"> | |
| <i class="fas fa-share-alt"></i> |
| <?php | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = array |
| "use strict"; | |
| /*Start of developer.mozilla.org Polyfill*/ | |
| /*WARNING FOR SERVER SIDE JAVASCRIPT IN XPAGES: http://xomino.com/2014/03/02/prototypal-inheritance-of-ssjs-across-the-whole-server-in-xpages/ http://stackoverflow.com/questions/26695434/how-to-clean-ssjs-in-domino-server-after-someone-used-javascript-*/ | |
| /* | |
| * Polyfill: | |
| Array.isArray | |
| Array.prototype.indexOf | |
| Array.prototype.lastIndexOf | |
| Array.prototype.forEach | |
| Array.prototype.some |
Read more: http://bit.ly/18Wq01O
A Pen by Ibrahim Jabbari on CodePen.