Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

navigator share api

mixedpuppy edited this page · 3 revisions

Navigator Share API

The F1 Share extension adds a share api to the navigator object, making simple sharing available to any website. This feature can help websites to add share buttons to specific items within a page, such as having a share link for each blog entry within a blog.

When the share function is called, the F1 share panel will open allowing the user to select how they want to share the link.

This API is experimental and provided to gather feedback from website authors around potential social api's built into the web browser.

API

navigator.mozilla.labs.share(options)

The options argument is an object that can contain the following values:

  • title: a title for the shared link, defaults to the page title
  • url: a url to share, defaults to the page url
  • thumbnail: a publicly accessible thumbnail image, default is a thumbnail of the page

Example usage

  navigator.mozilla.labs.share({'title':'this is a test!',
        'url': 'http://shane.caraveo.com',
        'thumbnail':'http://www.gravatar.com/avatar/168d158bd7f3f8185d917b26bfce8ab3.png'})
Something went wrong with that request. Please try again.