{"id":16184922,"url":"https://github.com/philipnewcomer/confirm-submit","last_synced_at":"2026-05-02T06:39:24.229Z","repository":{"id":57205568,"uuid":"121060643","full_name":"philipnewcomer/confirm-submit","owner":"philipnewcomer","description":"A simple little helper to show confirmation prompts for buttons and forms before submitting.","archived":false,"fork":false,"pushed_at":"2018-02-12T01:31:42.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T09:16:45.858Z","etag":null,"topics":["confirm","form","forms","html","javascript","npm-package","submit"],"latest_commit_sha":null,"homepage":"https://npmjs.org/package/confirm-submit","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philipnewcomer.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}},"created_at":"2018-02-10T22:39:23.000Z","updated_at":"2018-02-11T00:53:28.000Z","dependencies_parsed_at":"2022-09-12T22:50:12.995Z","dependency_job_id":null,"html_url":"https://github.com/philipnewcomer/confirm-submit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipnewcomer%2Fconfirm-submit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipnewcomer%2Fconfirm-submit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipnewcomer%2Fconfirm-submit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipnewcomer%2Fconfirm-submit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philipnewcomer","download_url":"https://codeload.github.com/philipnewcomer/confirm-submit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657282,"owners_count":20974345,"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":["confirm","form","forms","html","javascript","npm-package","submit"],"created_at":"2024-10-10T07:12:40.679Z","updated_at":"2026-05-02T06:39:19.202Z","avatar_url":"https://github.com/philipnewcomer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# confirm-submit\nA simple little helper to show confirmation prompts for buttons and forms before submitting.\n\n## Installation\n\n`npm install --save-dev confirm-submit`\n\n## Requirements\n\n- jQuery\n\n## Usage\n\n```javascript\nrequire('confirm-submit');\n```\n...or simply load `src/confirm-submit.js` in your app.\n\nCreate a link, button, or form that requires user confirmation before submitting. Add a data attribute named `confirm-submit`, which contains the message that should be shown to the user in the alert.\n\n```html\n\u003ca href=\"http://domain.com\" data-confirm-submit=\"Are you sure you want to leave?\"\u003e\n    Leave Site\n\u003c/a\u003e\n```\n\nYou can use it in conjunction with a Javascript event listener on the click action:\n\n```html\n\u003ca onclick=\"javascript:alert('Launching missing now!')\" data-confirm-submit=\"Are you sure you want to launch a missile?\"\u003e\n    Launch Missile\n\u003c/a\u003e\n```\n\nIt even works when used directly on form tags:\n\n```html\n\u003cform data-confirm-submit=\"Are you sure you want to submit this form?\"\u003e\n    \u003cinput type=\"submit\" value=\"Submit\"\u003e\n\u003c/form\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilipnewcomer%2Fconfirm-submit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilipnewcomer%2Fconfirm-submit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilipnewcomer%2Fconfirm-submit/lists"}