{"id":27152880,"url":"https://github.com/vincentloy/share-selected-text","last_synced_at":"2025-04-08T15:56:34.025Z","repository":{"id":9254678,"uuid":"61409548","full_name":"VincentLoy/share-selected-text","owner":"VincentLoy","description":"share selected text on twitter, buffer, and some others. Inspired by medium.com","archived":false,"fork":false,"pushed_at":"2022-12-06T20:18:10.000Z","size":465,"stargazers_count":70,"open_issues_count":5,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-13T21:56:33.576Z","etag":null,"topics":["buffer","facebook","javascript","javascript-library","medium","share","social-media","twitter"],"latest_commit_sha":null,"homepage":"https://vincentloy.github.io/share-selected-text/","language":"HTML","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/VincentLoy.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":"2016-06-18T00:26:19.000Z","updated_at":"2023-03-15T17:09:21.000Z","dependencies_parsed_at":"2022-08-07T05:00:46.578Z","dependency_job_id":null,"html_url":"https://github.com/VincentLoy/share-selected-text","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentLoy%2Fshare-selected-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentLoy%2Fshare-selected-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentLoy%2Fshare-selected-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentLoy%2Fshare-selected-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VincentLoy","download_url":"https://codeload.github.com/VincentLoy/share-selected-text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247878014,"owners_count":21011158,"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":["buffer","facebook","javascript","javascript-library","medium","share","social-media","twitter"],"created_at":"2025-04-08T15:56:30.705Z","updated_at":"2025-04-08T15:56:34.012Z","avatar_url":"https://github.com/VincentLoy.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShareSelectedText.js\n*share selected text on twitter, buffer, and some others. Inspired by [medium.com](https://medium.com)*\n\n![share selected text - ShareSelectedText.js](demo/sst.jpg)\n\nI made this small javascript library for [my personal blog](http://vincent-loy.fr), the existing \nlibraries doesn't fit my needs, so I created that one.\n\nShareSelectedText.js currently support the following social medias \u0026 services:\n- twitter\n- buffer\n- reddit\n- stumbleupon\n- tumblr\n- digg\n- linkedin\n- facebook\n\n*You can open an issue or follow [the contribution guidelines](#contribution-guidelines) if you want to add another service or social media*\n\n## Getting started\n\nAdd the CSS file (you have to put the `dist/fonts` directory and the `shareSelectedText.min.css` file in the same directory)\n```html\n\u003clink rel=\"stylesheet\" href=\"dist/shareSelectedText.min.css\"/\u003e\n```\n\nAdd the Javascript file before `body` HTML closing tag.\n```html\n\u003cscript src=\"dist/shareSelectedText.js\"\u003e\u003c/script\u003e\n```\n\nThen, you can init the plugin :\n```javascript\n// plugin initialization with default options\nshareSelectedText('.my-super-selector', {\n    tooltipClass: '',    // cool, if you want to customize the tooltip\n    sanitize: true,      // will sanitize the user selection to respect the Twitter Max length (recommended) \n    buttons: [           // services that you want to enable you can add : \n        'twitter',       // - twitter, tumblr, buffer, stumbleupon, digg, reddit, linkedin, facebook\n        'buffer'\n    ],\n    anchorsClass: '',    // class given to each tooltip's links\n    twitterUsername: '', // for twitter widget, will add 'via @twitterUsername' at the end of the tweet.\n    facebookAppID: '', // Can also be an HTML element inside the \u003chead\u003e tag of your page : \u003cmeta property=\"fb:APP_ID\" content=\"YOUR_APP_ID\"/\u003e\n    facebookDisplayMode: 'popup', //can be 'popup' || 'page'\n    tooltipTimeout: 250  //Timeout before that the tooltip appear in ms\n});\n```\n\n## Other Builds\n- Ruby on Rails engine: [share-selected-text_rails](https://github.com/WendyBeth/share-selected-text_rails) by [@WendyBeth](https://github.com/WendyBeth)\n\n## Contribution Guidelines\nTo contribute please consider to respect the following rules:\n- Work in a different branch, well named, based on current `develop` branch (I personally use [git-flow](http://danielkummer.github.io/git-flow-cheatsheet/)).\n- respect the `.erLintrc` rules.\n- If you add a new social media or service: \n    - add the service or social media SVG icon in dev/icons\n    - compile the font using [fontcustom](https://github.com/FontCustom/fontcustom) install fontcustom the run `fontcustom compile` in the icons directory, the run `gulp build:copy:fonts` in project root directory.\n    - Don't forget to add service's name and url.\n- small changes are better than huge changes.\n\nAnd don't forget that you are awesome!\n\n## Changelog\n- v1.1.1\n    - Make tooltip not clickable when not active (@DustinArmstrong)\n    \n- v1.1.0\n    - Add Facebook support (Thanks to [@WendyBeth](https://github.com/WendyBeth))\n\n- v1.0.0\n    - initial release\n\n- v1.0.1\n    - avoid font icons name conflicts by adding sst- prefix\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentloy%2Fshare-selected-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvincentloy%2Fshare-selected-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentloy%2Fshare-selected-text/lists"}