{"id":30883463,"url":"https://github.com/milesbarr/enhancejs","last_synced_at":"2025-09-08T09:46:45.275Z","repository":{"id":281383708,"uuid":"945112295","full_name":"milesbarr/enhancejs","owner":"milesbarr","description":"A lightweight JavaScript library that provides progressive enhancements for HTML.","archived":false,"fork":false,"pushed_at":"2025-09-01T21:45:42.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T23:28:14.280Z","etag":null,"topics":["html","html5","javascript","javascript-vanilla","js","progressive-enhancement","vanilla-javascript","vanilla-js"],"latest_commit_sha":null,"homepage":"","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/milesbarr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-08T17:28:52.000Z","updated_at":"2025-09-01T21:45:45.000Z","dependencies_parsed_at":"2025-03-29T17:27:22.990Z","dependency_job_id":"427a746e-d33c-4c5a-afc5-da666dd09f78","html_url":"https://github.com/milesbarr/enhancejs","commit_stats":null,"previous_names":["milesbarr/html-enhancements","milesbarr/html-enhancer","milesbarr/html-enhance"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/milesbarr/enhancejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milesbarr%2Fenhancejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milesbarr%2Fenhancejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milesbarr%2Fenhancejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milesbarr%2Fenhancejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milesbarr","download_url":"https://codeload.github.com/milesbarr/enhancejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milesbarr%2Fenhancejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166945,"owners_count":25233959,"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-09-08T02:00:09.813Z","response_time":121,"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":["html","html5","javascript","javascript-vanilla","js","progressive-enhancement","vanilla-javascript","vanilla-js"],"created_at":"2025-09-08T09:46:43.462Z","updated_at":"2025-09-08T09:46:45.268Z","avatar_url":"https://github.com/milesbarr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Enhance.js\n\nA lightweight JavaScript library that provides progressive enhancements for HTML\nforms and user interactions. This library adds functionality while maintaining\nzero dependencies and graceful degradation.\n\n## Setup\n\nInclude the library in your HTML file:\n\n```html\n\u003cscript src=\"enhance.js\" async defer\u003e\u003c/script\u003e\n```\n\nFor graceful degradation for users with JavaScript disabled, copy\n[`noscript.html`](noscript.html) into the `\u003chead\u003e` section of your HTML file.\n\n## Usage\n\n### Form Confirmations\n\nAdd confirmation dialogs to forms or form submission buttons:\n\n```html\n\u003cform data-confirm=\"Are you sure?\"\u003e\n  \u003c!-- Form content --\u003e\n  \u003cbutton data-formconfirm=\"Are you sure?\"\u003eSubmit\u003c/button\u003e\n\u003c/form\u003e\n```\n\n### Unsaved Changes Warning\n\nWarn users about unsaved changes in forms:\n\n```html\n\u003cform data-unsaved-changes-warning\u003e\n  \u003c!-- Form content --\u003e\n\u003c/form\u003e\n```\n\n### Share Buttons\n\nAdd share functionality:\n\n```html\n\u003cbutton type=\"button\" data-share\u003eShare\u003c/button\u003e\n```\n\n### Copy Buttons\n\nAdd copy-to-clipboard functionality:\n\n```html\n\u003cinput type=\"text\" id=\"text\"\u003e\n\u003cbutton type=\"button\" data-copy=\"text\"\u003eCopy\u003c/button\u003e\n```\n\n### Image File Previews\n\nPreview images for file inputs:\n\n```html\n\u003cinput type=\"file\" id=\"upload\"\u003e\n\u003cimg data-preview-for=\"upload\"\u003e\n```\n\n### Character Counter\n\nDisplay the remaining character count for text inputs:\n\n```html\n\u003ctextarea id=\"message\" maxlength=\"100\"\u003e\u003c/textarea\u003e\n\u003cspan data-chars-remaining-for=\"message\"\u003e\u003c/span\u003e\n```\n\n### Auto-Resizable Textareas\n\nAutomatically adjust textarea height based on content:\n\n```html\n\u003ctextarea data-auto-resize\u003e\u003c/textarea\u003e\n```\n\n### Smooth Scrolling\n\nAutomatic smooth scrolling to anchor links:\n\n```html\n\u003ca href=\"#section\"\u003eGo to section\u003c/a\u003e\n\u003cdiv id=\"section\"\u003eContent\u003c/div\u003e\n```\n\n### Invalid Inputs\n\nAutomatically reset `aria-invalid` attributes:\n\n```html\n\u003cinput type=\"text\" aria-invalid=\"true\"\u003e\n```\n\n### File Drag-and-Drop\n\nAdd file drag-and-drop functionality:\n\n```html\n\u003clabel data-drop-zone\u003e\n  \u003cinput type=\"file\"\u003e\n\u003c/label\u003e\n```\n\n### AJAX Support\n\nUse AJAX for form submissions and link navigation:\n\n```html\n\u003cdiv id=\"page\"\u003e\n  \u003ca href=\".\" data-ajax-replace=\"page\"\u003eRefresh page\u003c/a\u003e\n\u003c/div\u003e\n```\n\n## Graceful Degradation\n\nAll features are implemented as progressive enhancements, meaning the basic\nfunctionality will work even if JavaScript is disabled.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilesbarr%2Fenhancejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilesbarr%2Fenhancejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilesbarr%2Fenhancejs/lists"}