{"id":13749636,"url":"https://github.com/caffeinalab/ti.sharer","last_synced_at":"2025-12-25T07:53:04.500Z","repository":{"id":18886586,"uuid":"22104318","full_name":"caffeinalab/ti.sharer","owner":"caffeinalab","description":"Sharing widget heavily inspired by AirBNB, with default drivers and the ability to add custom drivers to share.","archived":false,"fork":false,"pushed_at":"2015-11-20T14:52:28.000Z","size":241,"stargazers_count":23,"open_issues_count":1,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-16T00:32:56.128Z","etag":null,"topics":[],"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/caffeinalab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-22T13:10:36.000Z","updated_at":"2020-03-05T07:20:08.000Z","dependencies_parsed_at":"2022-08-31T13:22:20.326Z","dependency_job_id":null,"html_url":"https://github.com/caffeinalab/ti.sharer","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.sharer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.sharer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.sharer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.sharer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caffeinalab","download_url":"https://codeload.github.com/caffeinalab/ti.sharer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253252013,"owners_count":21878618,"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":[],"created_at":"2024-08-03T07:01:08.436Z","updated_at":"2025-12-25T07:53:04.457Z","avatar_url":"https://github.com/caffeinalab.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Ti.Sharer\n\n### com.caffeinalab.titanium.sharer\n\nA simple **Sharing** widget heavy inspired to **AirBnb**, with default drivers and the ability to add custom drivers to share.\n\nThe widget use [Trimethyl.Share](https://github.com/CaffeinaLab/Trimethyl), so you **must** install Trimethyl to use it, or define your own custom drivers.\n\n![](http://cl.ly/image/0i092a3w2L1H/687474703a2f2f662e636c2e6c792f6974656d732f3365306e337132723059316f31673372334b30432f494d475f313138342e504e47_iphone5c_yellow_portrait.png)\n\n## Installation\n\n#### Via Gittio\n\n```\ngittio install com.caffeinalab.titanium.sharer\n```\n\n#### Via Github\n\nDownload the latest release, unzip in `app/widgets` and add in your *config.json*, under `dependencies`:\n\n```json\n\"dependencies\": {\n    \"com.caffeinalab.titanium.sharer\": \"*\"\n}\n```\n\n## Usage\n\n```javascript\nvar Sharer = Alloy.createWidget('com.caffeinalab.titanium.sharer');\nSharer.show({\n\turl: 'http://google.it',\n\ttext: \"Your awesome message!\"\n});\n```\n\n## API\n\n#### `show(so, [where]) `\n\nThe `so` object represents a `Trimethyl.share` argument.\n\n* `url`: The link to share\n* `text`: The personal share message to use, when supported by driver.\n* `image`: The image to share. Can be a URL or `Ti.Blob`.\n\n`where` is an Array of Strings of enabled drivers.\n\n#### `hide()`\n\nClose the mask.\n\n#### `setDriver(name, def)`\n\nAdd/replace a driver definition.\n\nA **driver definition** is in this form\n\n```javascript\n{\n\tcallback: function(e) { }, // The callback invoked on click (`e.source` represents the Button`\n\targs: {} // The property passed to the button\n}\n```\n\nAn example:\n\n```javascript\ncopytoclipboard: {\n\tcallback: function(e) {\n\t\tTi.UI.Clipboard.setText(e.shareObj.url);\n\t\te.source.titleid = L('Link copied!');\n\t},\n\targs: {\n\t\tborderColor: '#fff',\n\t\ttitleid: L('Copy link')\n\t}\n}\n```\n\n### `extendDriverArgs(name, args)`\n\nExtend a driver only at UI level.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaffeinalab%2Fti.sharer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaffeinalab%2Fti.sharer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaffeinalab%2Fti.sharer/lists"}