{"id":17176231,"url":"https://github.com/wanglin2/copyboard","last_synced_at":"2025-07-30T01:34:50.091Z","repository":{"id":112672519,"uuid":"73155160","full_name":"wanglin2/copyboard","owner":"wanglin2","description":"一个简洁的原生复制到剪贴板库","archived":false,"fork":false,"pushed_at":"2016-11-08T06:24:23.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-11T11:19:31.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wanglin2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-08T06:13:27.000Z","updated_at":"2024-12-29T16:06:56.000Z","dependencies_parsed_at":"2023-06-18T13:17:26.891Z","dependency_job_id":null,"html_url":"https://github.com/wanglin2/copyboard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wanglin2/copyboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wanglin2%2Fcopyboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wanglin2%2Fcopyboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wanglin2%2Fcopyboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wanglin2%2Fcopyboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wanglin2","download_url":"https://codeload.github.com/wanglin2/copyboard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wanglin2%2Fcopyboard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267792806,"owners_count":24144932,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-14T23:59:37.932Z","updated_at":"2025-07-30T01:34:50.027Z","avatar_url":"https://github.com/wanglin2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# copyboard\n一个简洁的原生复制到剪贴板库\n很多网站尤其是代码类的网站一般都会有一个功能，那就是点下按钮，就自动的把你需要的代码复制到剪贴板了，你只需要Ctrl+v粘贴就ok了，怎么样，是不是很省事.\n这个功能你值得拥有，有一个相关的库，叫clipboard.js，我稍微看了一下源码，好嘛，太高端了，es6用的很6，到处都是模块化思想与实践，作为一个新手，我是理解不了他的用意，不过我看到核心其实还是那种方法，具体什么方法，你可以看看本库的源码，或百度一下，反正你怎么开心怎么来。\n因为闲的蛋疼，所以我就简单的实现了一下该功能，只用了区区两百多行代码，但是，你要记住一句话，一分钱一分货，所以人家之所以写那么长是有它的用意的，我为什么写的这么短，是因为本人水平所限，只能写这么多，这也是没办法啊，啊，真不知道我什么时候才能成为一个真正的大神，路漫漫其修远兮。\n\n用法：\n\u003ctextarea name=\"box\" id=\"box\" cols=\"30\" rows=\"10\"\u003e王林漫谈-一个有意思的角落\u003c/textarea\u003e\n\u003cbutton id=\"btn\"\u003e按钮\u003c/button\u003e\nnew CopyBoard('#btn','#box',function(msg){\n    console.log('复制成功'+msg);\n});\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwanglin2%2Fcopyboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwanglin2%2Fcopyboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwanglin2%2Fcopyboard/lists"}