{"id":25856464,"url":"https://github.com/assisfery/socialsharejs","last_synced_at":"2025-03-01T18:18:27.324Z","repository":{"id":49322019,"uuid":"221291986","full_name":"assisfery/SocialShareJS","owner":"assisfery","description":"Library to make your web page shareable fast and easy in all the majors social networks.","archived":false,"fork":false,"pushed_at":"2022-04-23T22:05:35.000Z","size":115,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-05-13T12:23:22.151Z","etag":null,"topics":["javascript","javascript-library","social-network","social-share"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/assisfery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-12T19:08:30.000Z","updated_at":"2023-03-16T20:44:47.000Z","dependencies_parsed_at":"2022-08-28T06:12:06.054Z","dependency_job_id":null,"html_url":"https://github.com/assisfery/SocialShareJS","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assisfery%2FSocialShareJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assisfery%2FSocialShareJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assisfery%2FSocialShareJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assisfery%2FSocialShareJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/assisfery","download_url":"https://codeload.github.com/assisfery/SocialShareJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241404450,"owners_count":19957658,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","javascript-library","social-network","social-share"],"created_at":"2025-03-01T18:18:26.781Z","updated_at":"2025-03-01T18:18:27.308Z","avatar_url":"https://github.com/assisfery.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SocialShareJS\n\nThis is a simple libray to make your web page shareable fast and easy.\nIts allow to include the social share link of the major social network to your page.\n\nSee the demo here: https://assisfery.github.io/SocialShareJS/index.html\n\nCDN repository: https://www.jsdelivr.com/package/gh/assisfery/SocialShareJS\n\n[![](https://data.jsdelivr.com/v1/package/gh/assisfery/SocialShareJS/badge)](https://www.jsdelivr.com/package/gh/assisfery/SocialShareJS)\n\n### Install\nJust include the  **social-share.css**  and  **social-share.js**  files.\n```html\n\u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/assisfery/SocialShareJS@1.4/social-share.min.css\"\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/assisfery/SocialShareJS@1.4/social-share.min.js\"\u003e\u003c/script\u003e\n```\n\n### Dependences\nThe  **SocialShareJS**  don't dependents of none library, but its uses the **FontAwesome 5** Fonts, so make sure you have included it in your web page.\n```html\n\u003clink rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css\"\u003e\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/js/all.min.js\"\u003e\u003c/script\u003e\n```\n\n### Get Started\nTo have the social share buttons just put the class  **ss-box**  in one or more of you  **containers**\n```html\n\u003cdiv class=\"ss-box\"\u003e\u003c/div\u003e\n```\n\n### Selected Social\nIf you want to select specifics social share network just add the  **data-ss-social**  attribute in your container.\n```html\n\u003cdiv class=\"ss-box\" data-ss-social=\"facebook, pinterest\"\u003e\u003c/div\u003e\n```\n\n### Change Link\nFor defaults the SocialShareJs put the atual page location as share link but you can change it just including the  **data-ss-link**  attribute in your container.\n```html\n\u003cdiv class=\"ss-box\" data-ss-link=\"https://www.google.com/\"\u003e\u003c/div\u003e\n```\n\n### Custom Query String\nIn some of social network shares you could want to put a query string available just to specific social network, so to do that just include  \n**data-ss-_NAME_OF_SOCIAL_MEDIA = \"key1:value1, key2:value2\"** attribute,  \n  \nfor example  \n  \ninclude **data-ss-messenger = \"app_id:123456\"**, so it will include the query string **\u0026app_id=123456** in messenger share link, or  \ninclude **data-ss-email = \"subject:SocialShareJS is amazing\"**, it will include the query string **\u0026subject=Email Subject** in  \nemail share link.\n\n```html\n\u003cdiv class=\"ss-box\" data-ss-social=\"messenger, pinterest, email\" data-ss-messenger=\"app_id: 123456\" data-ss-email=\"subject:SocialShareJS is amazing\"\u003e\u003c/div\u003e\n```\n\n### Responsive check\nSome of buttons (like: **share native** ,**messenger**, **viber** and **sms**) perhaps not work on desktop OS, but its works in mobile OS like Android and IOS, so may be necessary to show that buttons only in mobile screen.  \n  \nTo solve that problem you could include the class **ss-responsive** on your container.\n```html\n\u003cdiv class=\"ss-box ss-responsive\"\u003e\u003c/div\u003e\n```\n\n### Customizations\n\n##### Hide Social Network Name\nIf you want to show just the icons without the name of Social Network just include **data-ss-content** attribute with value **false**.\n```html\n\u003cdiv class=\"ss-box\" data-ss-content=\"false\"\u003e\u003c/div\u003e\n```\n\n##### Rounded buttons\nIf you want to make button with circle shape just include the class  **ss-circle**  in  **ss-box**  container.\n```html\n\u003cdiv class=\"ss-box ss-circle\" data-ss-content=\"false\"\u003e\u003c/div\u003e\n```\n\n##### Flat buttons\nIf you want to make button without rounded border just include the class  **ss-flat**  in  **ss-box**  container.\n```html\n\u003cdiv class=\"ss-box ss-flat\"\u003e\u003c/div\u003e\n```\n\n##### Pill buttons\nIf you want to make button with pill shape effect just include the class **ss-pill** in **ss-box** container.\n```html\n\u003cdiv class=\"ss-box ss-pill\"\u003e\u003c/div\u003e\n```\n\n##### Button with Shadows\nIf you want to put shadow in button just include the class  **ss-shadow**  in  **ss-box**  container.\n```html\n\u003cdiv class=\"ss-box ss-shadow\"\u003e\u003c/div\u003e\n```\n\n##### Hide Icons\nIf you dont want to show the icons of Social Network just include **data-ss-icon** attribute with value **false**.\n```html\n\u003cdiv class=\"ss-box\" data-ss-icon=\"false\"\u003e\u003c/div\u003e\n```\n\n##### Change Icons\nIf you want to change the icon class of any Social Network to another icon of you preference or icon of others packages just include the **data-ss-icon-class** with value **social_name1: icon_class1, social_name2: iconclass2**\n\nfor example:\n\ninclude **data-ss-icon-class=\"facebook:fab fa-facebook-messenger,email:fas fa-sms\"** so it will put the icon **fab fa-facebook-messenger** instead the facebook default icon and it will put the icon **fas fa-sms** instead the email default icon.\n```html\n\u003cdiv class=\"ss-box\" data-ss-social=\"facebook, email\" data-ss-icon-class=\"facebook:fab fa-facebook-messenger,email:fas fa-sms\"\u003e\u003c/div\u003e\n```\n\n### Hover Effects\n\n##### Grow\nInclude **ss-grow** in your container to make button grow when the mouse is hover.\n```html\n\u003cdiv class=\"ss-box ss-grow\" data-ss-social=\"facebook\"\u003e\u003c/div\u003e\n```\n\n##### Shrink\nInclude **ss-shrink** in your container to make button shrink when the mouse is hover.\n```html\n\u003cdiv class=\"ss-box ss-shrink\" data-ss-social=\"facebook\"\u003e\u003c/div\u003e\n```\n\n##### Rotate\nInclude **ss-rotate** in your container to make button rotate when the mouse is hover.\n```html\n\u003cdiv class=\"ss-box ss-rotate\" data-ss-social=\"facebook\"\u003e\u003c/div\u003e\n```\n\n##### Float\nInclude **ss-float** in your container to make button float when the mouse is hover.\n```html\n\u003cdiv class=\"ss-box ss-float\" data-ss-social=\"facebook\"\u003e\u003c/div\u003e\n```\n\n### JavaScript Utils\n\nIf you want to create a share box in JavaScript you can use the follow function.\n```\nSocialShare.createShareBox(_elements, _link = null, _socials =  null, _showIcon = true, _showContent = true, _clearContainer = true);\n```\n\n-   **_elements**  - the dom elements where the socials buttons will be created\n-   **_link**  - the link/content will be shared, by default will be the current window location\n-   **_showIcon**  - the social button icon will be presented or not\n-   **_showContent**  - the social button name/label will be presented or not\n-   **_clearContainer**  - clear or not the elements before create the buttons\n\nFor example\n```\nSocialShare.createShareBox(\"#newShareBox\", \"https://github.com/assisfery/SocialShareJS\", \"facebook, twitter, email, sms, viber\");\n```\n\n##### Just Move On...\nIf you want to customize the share buttons like you want just do it adding css effect in your code.\n```css\n.ss-btn {\n  /* your code */\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassisfery%2Fsocialsharejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fassisfery%2Fsocialsharejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassisfery%2Fsocialsharejs/lists"}