{"id":32241070,"url":"https://github.com/binarybaba/prophetjs","last_synced_at":"2026-02-21T13:02:17.016Z","repository":{"id":58235066,"uuid":"68839455","full_name":"binarybaba/prophetjs","owner":"binarybaba","description":"Vanilla JS library to display toast messages.","archived":false,"fork":false,"pushed_at":"2018-10-31T11:50:57.000Z","size":118,"stargazers_count":32,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-23T09:46:31.847Z","etag":null,"topics":["callback","css","message","notification","notifications","popup","toast-message","toastr","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/binarybaba.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":"2016-09-21T17:07:10.000Z","updated_at":"2024-11-15T15:30:06.000Z","dependencies_parsed_at":"2022-08-31T09:21:12.513Z","dependency_job_id":null,"html_url":"https://github.com/binarybaba/prophetjs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/binarybaba/prophetjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarybaba%2Fprophetjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarybaba%2Fprophetjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarybaba%2Fprophetjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarybaba%2Fprophetjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binarybaba","download_url":"https://codeload.github.com/binarybaba/prophetjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarybaba%2Fprophetjs/sbom","scorecard":{"id":238445,"data":{"date":"2025-08-11","repo":{"name":"github.com/binarybaba/prophetjs","commit":"2ae09e9934c551c3a7f5292873cbb003ad27aefb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/28 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":"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":"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":"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":"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":"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":"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T06:11:19.209Z","repository_id":58235066,"created_at":"2025-08-17T06:11:19.209Z","updated_at":"2025-08-17T06:11:19.209Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29681468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T12:30:22.644Z","status":"ssl_error","status_checked_at":"2026-02-21T12:29:55.402Z","response_time":107,"last_error":"SSL_read: 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":["callback","css","message","notification","notifications","popup","toast-message","toastr","typescript"],"created_at":"2025-10-22T15:21:44.490Z","updated_at":"2026-02-21T13:02:17.003Z","avatar_url":"https://github.com/binarybaba.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# prophetjs\n[![NPM](https://nodei.co/npm/prophetjs.png?downloads=true\u0026downloadRank=true)](https://nodei.co/npm/prophetjs/)\n[![NPM](https://nodei.co/npm-dl/prophetjs.png?months=3)](https://nodei.co/npm/prophetjs/)\n\nA very lean awesome dependency free javascript library to display toast messages on web pages.\nThis project adheres to [Semantic Versioning](http://semver.org/). Sometimes I do screw up though. For an AngularJS directive, checkout [ngProphet](https://github.com/binarybaba/ngProphet). Prophet currently supports:\n - Chrome v26+\n - Firefox v20+\n - IE v10+ (sorry)\n - Safari v5+\n\n#### Version 1.0.0\n\n![default](https://github.com/binarybaba/prophetjs/raw/master/img/message-click-cb.gif)\n\n\n#### Table of Contents\n - [Installation](#installation)\n   - [Download](#get-the-files)\n   - [Install](#find-the-files)\n - [Usage](#api)\n   - [Simplest Display](#simplest-display)\n   - [Callback](#callback)\n   - [Options](#options)a\n   - [Custom Toast Types](#custom-types)\n - [Contributing](#contributing)\n - [License](#license)\n\n\n## Installation\n\n### Get the files:\nChoose any of the ways to get prophet:\n\n- clone from github `git clone https://github.com/binarybaba/prophetjs.git`\n- Install from [npm](https://www.npmjs.com/package/prophetjs) `npm install prophetjs --save`\n- Install from [bower](https://bower.io/search/?q=prophetjs) `bower install prophetjs --save`\n\n### Find the files\nYou'll see the files in the dist folder:\n  ```\n  dist\n  ├── css\n  │   ├── prophet.css\n  │   └── prophet.min.css\n  └── js\n      ├── prophet.js\n      ├── prophet.js.map\n      └── prophet-min.js\n ```\n### Wire it up\n Include the css and js files in your webpage:\n\n `\u003clink rel=\"stylesheet\" href=\"dist/css/prophet.min.css\"\u003e`\n\n `\u003cscript src=\"dist/js/prophet-min.js\"\u003e\u003c/script\u003e`\n \n `\u003cul class=\"prophet\"\u003e\u003c/ul\u003e`\n\n or\n\n `import Message from 'prophetjs'`\n\n\n# API\n\nProphet exposes a Message API. All customizations and configurations are done through this API.\nTo show a message, you will have to instantiate an instance of `Message`.\n\nThe toast message stays for a default duration of 4000 milliseconds or until the user clicks on it. After which,\nthe toast message is removed from the DOM.\n\n#### Simplest display\n\n`var toast = new Message('Harambe for president!').show();`\n\n#### Callback\n\nYou can also provide a callback to every toast message. The callback will be triggered after the toast message is removed or\nwhen the user clicks on it. The callback sends the autogenerated ID of the toast message (which can be overridden).\n\n![callback](https://github.com/binarybaba/prophetjs/raw/master/img/message-click-cb.gif)\n![no-callback](https://github.com/binarybaba/prophetjs/raw/master/img/message-default-no-click.gif)\n\n```\nvar toast = new Message(\"Awesome! We'll contact you soon!\", function(id){\n    console.log('Message ID:', id);\n    // some more code...\n    });\n    toast.show();\n}\n```\n\n#### Options\n\nYou can also optionally include a set of options as a second argument (followed by the callback if any ) on every toast message. If the values are not implemented, the default values take up.\n(Prophet was written in TypeScript which enforces type checking for development. Hence, it implements an interface IMessageOptions. More on that here...)\nThe following are the keys that options takes\n\n - `id`\n\t*The id is autogenerated per toast message.*\n\t - default: auto-generated\n\t - Type: number\n - `type`\n \t*Prophet has 3 presets types:* `success`, `error` *and* `default`. *You can also set more presets. Click [here](#custom-types) to see how.*\n\n \t![error](https://github.com/binarybaba/prophetjs/raw/master/img/message-error.gif)\n \t - default: `\"default\"`\n \t - Type: string\n - `duration`\n\t*The time each toast message stays on the web page before disappearing. Takes value in miliseconds.*\n\t - default: `4000`\n\t - Type: number\n\n - `class`\n \t*You can further customize the look of every toast message by providing extra CSS classes to override. Takes a single string of class names seperated by spaces.*\n \t - default: `\"\"`\n \t - Type: string\n\n ##### Example\n ```\n var ppap = new Message(\"Awesome! Pen Pineapple Apple Pen.\", {\n         id:i++, //i defined somewhere up above\n         duration: 8000,\n         type: 'success',\n         class : 'blue-background white-text thin-border'\n     }).show();\n ```\n\n## Custom Types\nYou can also add more types by providing the `background-color`, `color` and `type` for more uses. Please note, all the keys are mandatory.\n\n```\nMessage.config.types({\n    type: \"tip\",\n    backgroundColor:\"#fafafa\",\n    color:\"#313131\"\n})\n```\n\nNow you can use the type while invoking a new Message:\n\n```\nvar ppap = new Message(\"Awesome! Pen Pineapple Apple Pen.\", { type: 'tip'}, function(id){\n     console.log(id);\n })\n ppap.show();\n```\n![stackUp](https://github.com/binarybaba/prophetjs/raw/master/img/message-stack-up.gif)\n\n\n### Contributing\nThanks for taking out time for actually reading this block. You're awesome!\nProphetjs is written in [TypeScript](http://www.typescriptlang.org). I started writing this library as my venture into getting to know TypeScript better so if you're thinking of\ncontributing, please do install TypeScript as your dev dependencies. I'll be further updating this section to include guides on how to get\nyour way around the compiler and how you can install it per your IDE/editor (and maybe put this whole section in a new file)\n\n\n#### License\nOpen source under the [MIT License](https://github.com/binarybaba/prophetjs/blob/master/LICENSE).\nAll rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarybaba%2Fprophetjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarybaba%2Fprophetjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarybaba%2Fprophetjs/lists"}