{"id":16006370,"url":"https://github.com/nikku/simple-dialog","last_synced_at":"2026-04-22T16:34:59.741Z","repository":{"id":29123855,"uuid":"32653636","full_name":"nikku/simple-dialog","owner":"nikku","description":"A simple dialog component for the browser","archived":false,"fork":false,"pushed_at":"2016-07-31T12:43:21.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-11T14:41:29.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/nikku.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}},"created_at":"2015-03-21T23:03:45.000Z","updated_at":"2018-05-23T15:38:14.000Z","dependencies_parsed_at":"2022-07-25T18:47:14.879Z","dependency_job_id":null,"html_url":"https://github.com/nikku/simple-dialog","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/nikku/simple-dialog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fsimple-dialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fsimple-dialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fsimple-dialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fsimple-dialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikku","download_url":"https://codeload.github.com/nikku/simple-dialog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fsimple-dialog/sbom","scorecard":{"id":687395,"data":{"date":"2025-08-11","repo":{"name":"github.com/nikku/simple-dialog","commit":"31da2ecb8212c55eef33809c8cf9968e39479c86"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/nikku/.github/SECURITY.md:1","Info: Found linked content: github.com/nikku/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/nikku/.github/SECURITY.md:1","Info: Found text in security policy: github.com/nikku/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-22T01:17:13.344Z","repository_id":29123855,"created_at":"2025-08-22T01:17:13.345Z","updated_at":"2025-08-22T01:17:13.345Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32145868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T15:33:03.595Z","status":"ssl_error","status_checked_at":"2026-04-22T15:30:42.712Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-08T11:41:15.580Z","updated_at":"2026-04-22T16:34:54.732Z","avatar_url":"https://github.com/nikku.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-dialog\n\nA simple dialog component for the browser.\n\n![Open Dialog Window](https://github.com/nikku/simple-dialog/blob/master/resources/screenshot.png)\n\n\n## Features\n\n* content from string or element\n* (optional) backdrop\n* (optional) close handle\n* (optional) modal\n* return values\n* life-cycle events\n\n\n## Usage\n\n```javascript\nvar SimpleDialog = require('simple-dialog');\n\nvar dialog = SimpleDialog({\n  template: '\u003ch1\u003eHEADER\u003c/h1\u003e'\n});\n\n// open dialog\ndialog.open(function(returnValue) {\n  console.log('dialog closed with', returnValue);\n});\n\n// close with value\ndialog.close({ foo: 'BAR' });\n```\n\n\n## Configuration Options\n\nThe dialog constructor accepts the following configuration options:\n\n```\n{Boolean}        [backdrop=true]     if false, do not show backdrop\n{Boolean}        [closable=true]     if false, do not close via close control/backdrop\n{String}         [id]                an id to assign to the dialog\n{Element|String} [parent='body']     the parent node to attach the dialog to\n{Element|String} [template]          the element to display as the dialog content\n{String}         [className='']      classes to add to the .dlg element\n```\n\n\n## API\n\n### `open([closeFn])`\n\n### `close([resultValue])`\n\n### `toggleClass('class list')`\n\n### `element: DOMElement`\n\n\n## Template\n\nThe dialog is built from the following template:\n\n```html\n\u003cdiv class=\"dlg\"\u003e\n  \u003cdiv class=\"dlg-body\"\u003e\n    \u003ca class=\"dlg-close\" href\u003e\u0026times;\u003c/a\u003e\n    \u003cdiv class=\"dlg-content\"\u003e\u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nDefault styling can be found in the `less/dialog.less` file.\n\n\n## Access from the DOM\n\nThe dialog will attach itself to its dom node via the `dialog` property once it is attached to the document tree.\n\n```javascript\nSimpleDialog({\n  id: 'how-are-you',\n  template: 'How are you?'\n});\n\nsetTimeout(function() {\n  SimpleDialog('#how-are-you').close();\n}, 2000);\n```\n\n## Close from Template\n\nThe dialog will close on elements annotated with `.dlg-close`.\nA custom close result can be provided via the `dlg-close-result` attribute\non `.dlg-close` elements.\n\n```javascript\nSimpleDialog({\n  id: 'how-are-you',\n  template: '\u003cbutton class=\"dlg-close\" dlg-close-result=\"foo\"\u003eFOO\u003c/button\u003e'\n});\n```\n\n## Extend the Dialog\n\nThe dialog is an [EventEmitter](https://nodejs.org/api/events.html#events_class_events_eventemitter). Extend it by hooking into one of the following life-cycle events:\n\n```\nattach(parentElement)     attached to parentElement\npre-open                  about to open\nopen                      dialog is open\npre-close(resultValue)    about to close with returnValue\nclose(resultValue)        dialog closed with returnValue\ndetach(parentElement)     detached from parentElement\n```\n\nThe `this` argument inside an event listener will always refer to the respective dialog instance:\n\n\n```javascript\nSimpleDialog({ template: 'HUUUU!' }).on('pre-open', function() {\n  var dialog = this;\n\n  setTimeout(function() {\n    dialog.close('timeout, haha!');\n  }, 2000);\n});\n```\n\nUse the life-cycle events in order to make it fit into your favourite front-end library. An example integration into [AngularJS](https://angularjs.org/) can be found [here](https://github.com/nikku/ng-simple-dialog).\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikku%2Fsimple-dialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikku%2Fsimple-dialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikku%2Fsimple-dialog/lists"}