{"id":21163114,"url":"https://github.com/rojcode/keytype","last_synced_at":"2025-09-05T03:43:19.141Z","repository":{"id":217929971,"uuid":"745144287","full_name":"rojcode/keytype","owner":"rojcode","description":"A JavaScript project showcasing a dynamic content changer for HTML elements based on their selectors. The project includes a function (changeInnerHtmlById) and a keydown event listener, providing real-time updates on key presses. Ideal for understanding basic DOM manipulation and event handling.","archived":false,"fork":false,"pushed_at":"2024-01-19T07:19:28.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-27T01:41:22.843Z","etag":null,"topics":["dom","event","javascript","keyboard"],"latest_commit_sha":null,"homepage":"https://rojcode.github.io/keytype/","language":"HTML","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/rojcode.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}},"created_at":"2024-01-18T18:19:51.000Z","updated_at":"2024-01-19T05:46:15.000Z","dependencies_parsed_at":"2024-01-19T09:29:54.707Z","dependency_job_id":"d4a27a70-9bc0-43c6-9a77-958ca21671a1","html_url":"https://github.com/rojcode/keytype","commit_stats":null,"previous_names":["rojcode/keytype.io","rojcode/keytype"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rojcode/keytype","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rojcode%2Fkeytype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rojcode%2Fkeytype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rojcode%2Fkeytype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rojcode%2Fkeytype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rojcode","download_url":"https://codeload.github.com/rojcode/keytype/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rojcode%2Fkeytype/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271989847,"owners_count":24854702,"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-08-24T02:00:11.135Z","response_time":111,"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":["dom","event","javascript","keyboard"],"created_at":"2024-11-20T13:39:24.017Z","updated_at":"2025-08-25T01:12:14.831Z","avatar_url":"https://github.com/rojcode.png","language":"HTML","readme":"# Dynamic Element Content Changer with Keyboard Event\n![Project Screenshot](https://s6.uupload.ir/files/screen_shot_1402-10-28_at_22.05.25_hgns_whaz.png)\n\nThis project includes a JavaScript function (`changeInnerHtmlById`) that allows you to dynamically change the content of an HTML element using its selector. Additionally, there is an event listener attached to the `keydown` event that demonstrates the usage of this function by updating the content of several elements with information about the key pressed.\n\n## Project Overview\n\nThe primary goal of this project is to showcase a simple JavaScript function for dynamically updating HTML elements based on their selectors. The project also includes an event listener that captures the `keydown` event, providing real-time updates about the key pressed by the user.\n\n## Function Usage\n\n### `changeInnerHtmlById(selector, content, callback)`\n\nChanges the content of an HTML element identified by the provided selector.\n\n- **Parameters:**\n  - `selector` (string): The selector of the element (e.g., an id).\n  - `content` (string): The new text content to set for the element.\n  - `callback` (function, optional): A function to be executed on the selected element after updating its content.\n\n**Example:**\n```javascript\nchangeInnerHtmlById('title', 'New Title', (element) =\u003e {\n  element.style.color = 'blue';\n});\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frojcode%2Fkeytype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frojcode%2Fkeytype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frojcode%2Fkeytype/lists"}