{"id":20877730,"url":"https://github.com/dafrok/clip-it","last_synced_at":"2025-05-12T16:30:55.381Z","repository":{"id":20246324,"uuid":"84695788","full_name":"Dafrok/clip-it","owner":"Dafrok","description":"A totally easy way for modern browsers to put something into clipboard.","archived":false,"fork":false,"pushed_at":"2023-01-12T08:44:31.000Z","size":765,"stargazers_count":12,"open_issues_count":14,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-14T09:22:19.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dafrok.github.io/clip-it","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/Dafrok.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":"2017-03-12T03:03:02.000Z","updated_at":"2023-07-21T13:21:48.000Z","dependencies_parsed_at":"2023-01-14T13:03:30.811Z","dependency_job_id":null,"html_url":"https://github.com/Dafrok/clip-it","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dafrok%2Fclip-it","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dafrok%2Fclip-it/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dafrok%2Fclip-it/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dafrok%2Fclip-it/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dafrok","download_url":"https://codeload.github.com/Dafrok/clip-it/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253776718,"owners_count":21962535,"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-11-18T06:58:21.561Z","updated_at":"2025-05-12T16:30:55.078Z","avatar_url":"https://github.com/Dafrok.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLIP IT\n\nA totally easy way for modern browsers to put something into clipboard.\n\n[![build](https://travis-ci.org/Dafrok/clip-it.svg?branch=master)]()\n[![npm](https://img.shields.io/npm/v/clip-it.svg)](https://www.npmjs.com/package/clip-it)\n[![codecov](https://codecov.io/gh/Dafrok/clip-it/branch/master/graph/badge.svg)](https://codecov.io/gh/Dafrok/clip-it)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()\n\n\n## Try it Out\n\n\u003e [Demo by Codepen](https://codepen.io/Dafrok/full/jaQZME/)\n\n## Installation\n\n```bash\n$ npm i --save clip-it\n```\n\n## Usage\n\n### HTML\n\n```html\n\u003cbutton\u003eCopy as Text\u003c/button\u003e\n\u003cbutton\u003eCopy as HTML\u003c/button\u003e\n```\n\n### JavaScript\n\n```javascript\nimport clipIt from 'clip-it'\n\nconst $btnCopyText = document.querySelector('button')\nconst $btnCopyHTML = document.querySelector('button')\n\n$btnCopyText.onclick = e =\u003e clipIt('Hello World'))\n\n$btnCopyHTML.onclick = e =\u003e clipIt('\u003cspan style=\"color: red;\"\u003eHello world!\u003c/span\u003e', {\n  contentType: 'text/html'\n}))\n```\n\n## ATTENTION\n\n- The `clip-it` API must be triggered in the same callstack with a trusted event.\n- Some browsers only supports to copy plain text. (e.g. iOS Safari)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdafrok%2Fclip-it","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdafrok%2Fclip-it","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdafrok%2Fclip-it/lists"}