{"id":13760171,"url":"https://github.com/EvandroLG/selecting","last_synced_at":"2025-05-10T10:31:38.811Z","repository":{"id":25153055,"uuid":"28575598","full_name":"EvandroLG/selecting","owner":"EvandroLG","description":":fishing_pole_and_fish: A library that allows you to access the text selected by the user","archived":false,"fork":false,"pushed_at":"2015-10-22T18:57:17.000Z","size":339,"stargazers_count":94,"open_issues_count":4,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-01T06:02:25.575Z","etag":null,"topics":["javascript","selecting"],"latest_commit_sha":null,"homepage":"","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/EvandroLG.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}},"created_at":"2014-12-29T01:00:55.000Z","updated_at":"2025-02-22T23:17:24.000Z","dependencies_parsed_at":"2022-08-23T02:50:36.519Z","dependency_job_id":null,"html_url":"https://github.com/EvandroLG/selecting","commit_stats":null,"previous_names":["evandrolg/selectingtext"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvandroLG%2Fselecting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvandroLG%2Fselecting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvandroLG%2Fselecting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvandroLG%2Fselecting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvandroLG","download_url":"https://codeload.github.com/EvandroLG/selecting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253401394,"owners_count":21902664,"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","selecting"],"created_at":"2024-08-03T13:01:04.761Z","updated_at":"2025-05-10T10:31:38.565Z","avatar_url":"https://github.com/EvandroLG.png","language":"JavaScript","readme":"# selecting\nA library that allows you to access the text selected by the user.\n\n## Instalation\nTo install Selecting, execute:\n\n```shell\n  npm install selecting\n```\n\nOr Bower too:\n```shell\n  bower install selecting\n```\n\nOr simply pick up the file from src directory.\n\n## Supported Browsers\n* Google Chrome\n* Firefox\n* Internet Explorer 9.0+\n* Safari\n* Opera\n* iOS\n* Android\n\n## How to use?\nSelecting doesn't depend on jQuery, Zepto or any other library to work. You need just to include it at the end of your HTML code:\n\n```html\n  \u003cscript src=\"selecting.js\"\u003e\u003c/script\u003e\n```\n\nThen you can call \u003ccode\u003ewindow.selecting\u003c/code\u003e function passing two parameters: an DOM element (jQuery object or NodeList) to listen to and a callback function that receive a [Selection](https://developer.mozilla.org/en-US/docs/Web/API/Window.getSelection) object by parameter. For example:\n\n```js\n  window.selecting($('.container'), function(selector) {\n    // Properties\n    selector.text; // The selected text\n    selector.wordCount; // The number of words selected\n  });\n```\n\n## Example\n[See a simple example](http://evandrolg.github.io/selecting).\n\n## Contributors\n|[![@evandrolg](https://avatars3.githubusercontent.com/u/444054?v=3\u0026amp;s=96)](https://github.com/evandrolg)|[![@felquis](https://avatars2.githubusercontent.com/u/736728?v=3\u0026s=96)](https://github.com/felquis)|[![@gibatronic](https://avatars0.githubusercontent.com/u/819643?v=2\u0026amp;s=96)](https://github.com/gibatronic)|\n|:---:|:---:|:---:|\n|[@evandrolg](http://www.github.com/evandrolg)|[@felquis](http://www.github.com/felquis)|[@gibatronic](http://www.github.com/gibatronic)|\n","funding_links":[],"categories":["String","String [🔝](#readme)","字符串"],"sub_categories":["Runner","运行器","运行器e2e测试"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEvandroLG%2Fselecting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEvandroLG%2Fselecting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEvandroLG%2Fselecting/lists"}