https://github.com/shakilahmed0369/ez-share
ezShare is a lightweight JavaScript plugin that enables easy sharing of content on various social media platforms.
https://github.com/shakilahmed0369/ez-share
easy-integration javascript-plugin share-buttons sharebuttons social-sharing web-tools
Last synced: about 2 months ago
JSON representation
ezShare is a lightweight JavaScript plugin that enables easy sharing of content on various social media platforms.
- Host: GitHub
- URL: https://github.com/shakilahmed0369/ez-share
- Owner: shakilahmed0369
- Created: 2024-05-02T20:26:41.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-04T05:43:12.000Z (about 1 year ago)
- Last Synced: 2025-02-09T18:31:00.274Z (3 months ago)
- Topics: easy-integration, javascript-plugin, share-buttons, sharebuttons, social-sharing, web-tools
- Language: JavaScript
- Homepage: https://shakilahmed0369.github.io/ez-share/
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🚀 ezShare - JavaScript Social Share Plugin
ezShare is a lightweight JavaScript plugin for easy sharing of content on various social media platforms.
## Installation
You can install ezShare by including the JavaScript file in your project. You have two options:
1. **Download**: You can download the JavaScript file from the [GitHub repository](https://github.com/shakilahmed0369/ez-share) and include it in your project manually.
2. **CDN**: Alternatively, you can use the ezShare script directly from the CDN:
```html
```
## Usage
To activate ezShare, call the `execute` method after the DOM has loaded:
```javascript
document.addEventListener("DOMContentLoaded", function() {
ezShare.execute();
});
```## Available Platforms and Attributes
| Platform | Class | Attributes | Description |
|-----------|--------------|--------------|-------------------------------------------------------------------------------------------------|
| Facebook | `ez-facebook` | `data-url`, `data-hashtags` | Share URL to Facebook. Optionally add hashtags. If no `data-url`, current URL will be used. |
| LinkedIn | `ez-linkedin` | `data-url` | Share URL to LinkedIn. If no `data-url`, current URL will be used. |
| Pinterest | `ez-pinterest` | `data-url`, `data-description`, `data-media` | Share URL to Pinterest. Optionally add description and media. If no `data-url`, current URL will be used. |
| Pocket | `ez-pocket` | `data-url` | Save URL to Pocket for later reading. If no `data-url`, current URL will be used. |
| Reddit | `ez-reddit` | `data-url`, `data-title` | Share URL to Reddit. Optionally add title. If no `data-url`, current URL will be used. |
| Telegram | `ez-telegram` | `data-url`, `data-text` | Share URL to Telegram. Optionally add custom message. If no `data-url`, current URL will be used.|
| X | `ez-x` | `data-url`, `data-text`, `data-via`, `data-hashtags` | Share URL to Twitter. Customize tweet text, source, and hashtags. If no `data-url`, current URL will be used. |## Example
```html
Share on Facebook
Share on LinkedIn```
## Note
- ezShare does not provide any predefined styles for the share buttons. Users have the freedom to style them according to their design preferences.
- Ensure each button element has the appropriate class (`ez-PLATFORM`) and data attributes (`data-url`, `data-description`, etc.) for the desired platform and parameters.