{"id":16805455,"url":"https://github.com/dewski/cmd-enter","last_synced_at":"2025-06-20T23:09:42.931Z","repository":{"id":6679682,"uuid":"7924672","full_name":"dewski/cmd-enter","owner":"dewski","description":"Every textarea should let you submit comments by pressing cmd-enter or ctrl-enter. For every site that doesn't support it, a kitten weeps. Here's to making less kittens weep.","archived":false,"fork":false,"pushed_at":"2013-01-31T00:48:28.000Z","size":137,"stargazers_count":36,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-20T23:09:00.213Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dewski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-30T21:50:59.000Z","updated_at":"2025-02-26T05:38:36.000Z","dependencies_parsed_at":"2022-08-26T04:02:02.297Z","dependency_job_id":null,"html_url":"https://github.com/dewski/cmd-enter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dewski/cmd-enter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewski%2Fcmd-enter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewski%2Fcmd-enter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewski%2Fcmd-enter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewski%2Fcmd-enter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dewski","download_url":"https://codeload.github.com/dewski/cmd-enter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewski%2Fcmd-enter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261032114,"owners_count":23100051,"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-10-13T09:48:17.487Z","updated_at":"2025-06-20T23:09:37.909Z","avatar_url":"https://github.com/dewski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cmd-enter\n\nEvery textarea should let you submit comments by pressing cmd-enter or\nctrl-enter. For every site that doesn't support it, a kitten weeps. Here's\nto making less kittens weep.\n\n## Requirements\n\n- [dotjs](https://github.com/defunkt/dotjs)\n\n## Supported Sites\n\n- [dribbble](https://github.com/dewski/cmd-enter/blob/master/dribbble.com.js)\n- [hackernews](https://github.com/dewski/cmd-enter/blob/master/news.ycombinator.com.js)\n- [reddit](https://github.com/dewski/cmd-enter/blob/master/reddit.com.js)\n- [twitter](https://github.com/dewski/cmd-enter/blob/master/twitter.com.js)\n- [stackoverflow](https://github.com/dewski/cmd-enter/blob/master/stackoverflow.com.js)\n\n## Contributing\n\nIf reddit.com is giving you a bad time and not letting you use cmd-enter\nto submit comments, just create a reddit.js.com file and add the JavaScript\nrequired to submit comments (example below). jQuery is available from dotjs\nregardless if the target site has it or not. Some sites may require multiple\nevent listeners if they format their textareas differently throughout their\nsite.\n\nHere is an example of adding cmd-enter to reddit.com:\n\n```js\n$(document).on('keydown', '.usertext-edit textarea', function(e) {\n  if(e.keyCode == 13 \u0026\u0026 (e.metaKey || e.ctrlKey)) {\n    $(this).parents('form').submit()\n  }\n})\n```\n\nHints:\n\n- `.usertext-edit textarea` is the selector for all textareas we are listening to.\n- `e.keyCode == 13` - 13 here is the enter key.\n- `(e.metaKey || e.ctrlKey)` is either the command key or ctrl key.\n\n## Note on Patches/Pull Requests\n\n- Fork the project.\n- Add the cmd-enter behavior to a site.\n- Add the site to the [Supported Sites](https://github.com/dewski/cmd-enter#supported-sites) part of this README.\n- Send me a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdewski%2Fcmd-enter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdewski%2Fcmd-enter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdewski%2Fcmd-enter/lists"}