{"id":25311473,"url":"https://github.com/mttbernardini/dialog","last_synced_at":"2025-09-01T00:33:27.502Z","repository":{"id":47778103,"uuid":"42994681","full_name":"mttbernardini/dialog","owner":"mttbernardini","description":"ℹ️ A simple JS library for minimal dialog boxes on webpages.","archived":false,"fork":false,"pushed_at":"2021-02-12T19:55:51.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T14:26:06.039Z","etag":null,"topics":["alert","customizable","dialog","dialog-boxes","library","modal-dialogs","prompt"],"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/mttbernardini.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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":"2015-09-23T10:33:16.000Z","updated_at":"2021-06-03T20:25:37.000Z","dependencies_parsed_at":"2022-09-08T02:25:31.770Z","dependency_job_id":null,"html_url":"https://github.com/mttbernardini/dialog","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mttbernardini%2Fdialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mttbernardini%2Fdialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mttbernardini%2Fdialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mttbernardini%2Fdialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mttbernardini","download_url":"https://codeload.github.com/mttbernardini/dialog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247645867,"owners_count":20972559,"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":["alert","customizable","dialog","dialog-boxes","library","modal-dialogs","prompt"],"created_at":"2025-02-13T14:24:56.852Z","updated_at":"2025-04-07T11:33:45.259Z","avatar_url":"https://github.com/mttbernardini.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dialog.js #\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a61ce490dd304193865a6b93f793e8b4)](https://www.codacy.com/app/mttbernardini/dialog?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=mttbernardini/dialog\u0026amp;utm_campaign=Badge_Grade)\n\nThis project is a light JS library providing basic asynchronous modal dialogs for webpages, aiming to replace the built-in `alert()`, `prompt()` and `confirm()` which instead block JavaScript execution.\n\nThe library provides one function `dialog()` in the global namespace (`window`), taking as argument an object of properties and returning a `Promise` resolving to the result object.\n\n```js\nprop = {\n\ttype: \"alert\",\n\ttitle: \"Message\",\n\tcontent: \"Hello, world!\",\n};\n\ndialog(prop).then(myFunc);\n// Shows the dialog box and calls `myFunc` after closing it\n```\n\n\n## How to use ##\n\nThe inclusion on a project is straightforward and only consist of adding the script and the default stylesheet:\n\n```html\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"/path/to/dialog_default.css\"\u003e\n\u003cscript type=\"text/javascript\" src=\"/path/to/dialog.js\"\u003e\u003c/script\u003e\n```\n\n\n## Documentation ##\n\nA short and effective documentation for all the supported properties can be found at the beginning of the `dialog.js` file.\n\nA more detailed documentation providing examples can be found in the [wiki][1]\n\n\n## Live demo ##\n\nYou can see three live examples [here][2].\n\n\n## Compatibility ##\n\nThe software is compatible with all major browsers. A polyfill might be needed in order to support `Promise`s, no other ES6 features are used.\n\nThe stylesheet is W3C valid. A prefixer (like [-prefix-free][3]) might be needed in order to add vendor prefixes.\n\n\n## License and sharing ##\n\n© 2015 Matteo Bernardini, [@mttbernardini][4].\n\nThis project is licensed under the MIT License.  \nPlease refer to the LICENSE file for further information.\n\n\n[1]: https://github.com/mttbernardini/dialog/wiki\n[2]: https://mttbernardini.github.io/dialog/demo.html\n[3]: https://github.com/LeaVerou/prefixfree\n[4]: https://twitter.com/mttbernardini\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmttbernardini%2Fdialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmttbernardini%2Fdialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmttbernardini%2Fdialog/lists"}