All Projects β†’ NickKaramoff β†’ Shareon

NickKaramoff / Shareon

Licence: mit
πŸ“― Lightweight, stylish and ethical share buttons for popular social networks

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Shareon

shamirs-secret-sharing
A simple implementation of Shamir's Secret Sharing configured to use a finite field in GF(2^8) with 128 bit padding
Stars: ✭ 59 (-83.88%)
Mutual labels:  sharing
videojs-share
Share plugin for video.js
Stars: ✭ 24 (-93.44%)
Mutual labels:  sharing
Ideas
πŸš€ Ideas for everyone under a CC licence. Feel free to use.
Stars: ✭ 290 (-20.77%)
Mutual labels:  sharing
zusam
Private groups to share messages, photos, videos, links with friends and family.
Stars: ✭ 79 (-78.42%)
Mutual labels:  sharing
circles
πŸ‘ͺ Create groups with other users on a Nextcloud instance and share with them
Stars: ✭ 121 (-66.94%)
Mutual labels:  sharing
verse-blender
Blender Python Add-on with Verse integration
Stars: ✭ 36 (-90.16%)
Mutual labels:  sharing
2read
Convert article in current tab to readable form and upload it to P2P network - IPFS
Stars: ✭ 130 (-64.48%)
Mutual labels:  sharing
Bug Project Framework
ζΌζ΄žεˆ©η”¨ζ‘†ζžΆζ¨‘ε—εˆ†δΊ«δ»“εΊ“
Stars: ✭ 343 (-6.28%)
Mutual labels:  sharing
transfer-sh
Node.js CLI tool for easy file sharing using Transfer.sh
Stars: ✭ 24 (-93.44%)
Mutual labels:  sharing
Upterm
Secure Terminal Sharing
Stars: ✭ 261 (-28.69%)
Mutual labels:  sharing
commons-booking
Wordpress plugin for managing and booking of common goods. New Version 2: https://github.com/wielebenwir/commonsbooking
Stars: ✭ 24 (-93.44%)
Mutual labels:  sharing
modelforge
Python library to share machine learning models easily and reliably.
Stars: ✭ 18 (-95.08%)
Mutual labels:  sharing
commonsbooking
CommonsBooking is an open source Wordpress plugin for sharing items with users. This is the NEW CommonsBooking (starting at version v2.0.0). Please install plugin via Wordpress plugin directory.
Stars: ✭ 24 (-93.44%)
Mutual labels:  sharing
pyqrshare
Lets you transfer files and directories from your computer to your mobile device by scanning a QR code right from the terminal.
Stars: ✭ 12 (-96.72%)
Mutual labels:  sharing
Mediacms
MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
Stars: ✭ 313 (-14.48%)
Mutual labels:  sharing
Communicado
A simpler way to share on iOS.
Stars: ✭ 26 (-92.9%)
Mutual labels:  sharing
barrier
Open-source KVM software
Stars: ✭ 17,366 (+4644.81%)
Mutual labels:  sharing
Commuter
🚎 Notebook sharing hub
Stars: ✭ 353 (-3.55%)
Mutual labels:  sharing
Rrssb
RRSSB is a KNI Labs freebie crafted by @dbox and @joshuatuscan.
Stars: ✭ 3,443 (+840.71%)
Mutual labels:  sharing
wp-to-diaspora
Automatically share WordPress posts on diaspora*
Stars: ✭ 15 (-95.9%)
Mutual labels:  sharing

shareon

shareon logo β€” the Postal Horn emoji

Lightweight, stylish and ethical share buttons

  • Small. Dependency-free. CSS+JS bundle is only 6 KB minified and gzipped.
  • Stylish. Uses official vector logos and colors with no visual mess.
  • Ethical. Embeds no tracking code. JS is required only for the setup.
shareon demo screenshot

Observe the live demo here: shareon.js.org

Install

Include the link to shareon's JS and CSS in your website:

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/shareon.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/shareon.min.js" type="text/javascript"></script>

or install it via NPM use it in a JS file that you will bundle:

npm install shareon
# or
yarn add shareon
const shareon = require('shareon');
// or
import shareon from 'shareon';

Initialization

By default, shareon will initialize every button after page load. It also exports the shareon function, that will let you repopulate your buttons with updated information (for example, if you changed the page title):

// shareon auto-initializes

window.title = "Cool new window title";
shareon();

If you want to postpone the initialization, you can import the noinit-version of the package. You'll need to manually call the shareon function when you want the buttons to be initialized:

<!-- notice the 'noinit' section of the url for JS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/shareon.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/noinit/shareon.min.js" type="text/javascript"></script>

<script type="text/javascript">
  // do something important
  shareon();
</script>

or, if you're using Node:

const shareon = require('shareon/dist/noinit/shareon');
// or
import shareon from 'shareon/dist/noinit/shareon';

// do something important
shareon();

Usage

shareon was heavily inspired by Likely, and has a backwards-compatible API (excluding themes and sizes).

Create a container with class shareon and populate it with elements, whose classes match the names of social networks:

<div class="shareon">
    <a class="facebook"></a>
    <a class="linkedin"></a>
    <a class="mastodon"></a>
    <!-- FB App ID is required for the Messenger button to function -->
    <a class="messenger" data-fb-app-id="0123456789012345"></a>
    <a class="odnoklassniki"></a>
    <a class="pinterest"></a>
    <a class="pocket"></a>
    <button class="reddit"></button>
    <button class="telegram"></button>
    <button class="twitter"></button>
    <button class="viber"></button>
    <button class="vkontakte"></button>
    <button class="whatsapp"></button>
</div>

If you use <a>, the buttons will get a href-attribute to them. In other cases they will get a listener on click event, so you can use <button>s if you wish.

By default, the URL and the title of the page will be used in sharing dialogs. To change this, you can use the data-url and data-title attributes. Use them on the whole container or on the specific buttons:

<div class="shareon" data-url="https://example.com">
    <a class="facebook" data-title="Custom Facebook title"></a>
    <a class="twitter" data-title="Custom Twitter title"></a>
</div>

Apart from the URL and title, some networks support extra parameters:

  • you have to add data-fb-app-id to the FB Messenger button to make sharing even possible
  • add data-media to an Odnoklassniki, Pinterest, or VK button to customize the pinned picture
  • add data-text to a WhatsApp, Mastodon, Telegram, or Viber button to add custom message text
  • add data-via to a Twitter or Mastodon button to mention a user

Here are all the custom parameters in their glory:

<div class="shareon" data-url="https://example.com/custom-url">
    <a class="facebook" data-title="Custom Facebook title"></a>
    <a class="messenger" data-fb-app-id="0123456789012345"></a>
    <a class="pinterest" data-media="https://picsum.photos/500">Pin</a>
    <a class="telegram" data-text="Check this out!"></a>
    <a class="twitter" data-via="MyNickname"></a>
    <a class="mastodon" data-via="@[email protected]"></a>
    <a class="whatsapp" data-url="https://my-cool-website.com">Send</a>
</div>

License

MIT Β© Nikita Karamov

shareon logo is the Postal Horn emoji from Noto Emoji, which is licensed under the Apache License v2.0.

Includes a modified version of the Mastodon logo, which is licensed under the APGLv3 license or later.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].