Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

web-share-shim

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-share-shim

A polyfill for the WebShare API. It provides `navigator.share()` so you can share content on any device via WhatsApp, Telegram, Facebook, e-mail, and SMS. Try the [demo](http://nimiq.github.io/web-share-shim/demo/)! The whole package is 9.6kB minified, 4k

  • 1.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Web Share Shim

A polyfill for the WebShare API. It provides navigator.share() so you can share content on any device via WhatsApp, Telegram, Facebook, e-mail, and SMS. Try the demo! The whole package is 9.6kB minified, 4kB gzipped and licensed under the MIT License.

Usage

Open the share dialog by calling navigator.share:

  navigator.share({
    title: 'Web Share Shim',
    text: 'Check out Web Share Shim — it rocks!',
    url: 'http://nimiq.github.io/web-share-shim',
  })
  .then( _ => console.log('Successful share'))
  .catch( error => console.log('Error sharing', error));
AttributeOptionsDefaultDescription
titleString""A short title of what you are sharing.
textString""A text describing what you are sharing.
urlURL as String""A link to what you are sharing.
facebookIdnumber"158651941570418"ID of your facebook app if you want to support sharing to facebook on a desktop device. (default ID for demo only)

Build source code

You need to have gulp and all dependencies installed.

npm install 
npm install gulp

Then run gulp to build web-share-shim.bundle.min.js.

FAQs

Package last updated on 22 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc