{"id":15024319,"url":"https://github.com/antman261/lightalertjs","last_synced_at":"2026-01-05T05:05:44.317Z","repository":{"id":113697310,"uuid":"83759936","full_name":"Antman261/LightAlertJS","owner":"Antman261","description":"A lightweight notification javascript library","archived":false,"fork":false,"pushed_at":"2017-03-08T05:24:00.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T14:48:09.180Z","etag":null,"topics":["alerting","alerts","bootstrap3","javascript","jquery","lightweight","notifications","typescript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Antman261.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-03T05:12:00.000Z","updated_at":"2023-03-05T06:17:24.000Z","dependencies_parsed_at":"2023-08-01T09:15:34.666Z","dependency_job_id":null,"html_url":"https://github.com/Antman261/LightAlertJS","commit_stats":{"total_commits":7,"total_committers":3,"mean_commits":"2.3333333333333335","dds":0.2857142857142857,"last_synced_commit":"cfa076298b4c0deda216d60f40c59a85ae1660f3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antman261%2FLightAlertJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antman261%2FLightAlertJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antman261%2FLightAlertJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antman261%2FLightAlertJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Antman261","download_url":"https://codeload.github.com/Antman261/LightAlertJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244928659,"owners_count":20533609,"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":["alerting","alerts","bootstrap3","javascript","jquery","lightweight","notifications","typescript"],"created_at":"2024-09-24T20:00:07.362Z","updated_at":"2026-01-05T05:05:44.280Z","avatar_url":"https://github.com/Antman261.png","language":"JavaScript","readme":"# LightAlertJS\nA lightweight javascript notification library with customisable templates and layout in just 3kB.\n\n## Installation\n\nInstall via npm\n`npm install lightalertjs`\n\n## Usage\n\nStart by creating a service provider\n\n```javascript\nvar lightalert = new require('lightalertjs').NotificationService({\n  $elem: $(\"#notification-stack\")\n});\n```\n\nThen use service to create notifications\n\n```javascript\nlightalert.notify(\"Hello world!\")\n```\n\nAdd an image to the notification:\n\n```javascript\nlightalert.notify(\"Hello world!\", \"https://example.com/hello.svg\")\n```\n\nAdd a class, in this case changing background and text:\n\n```javascript\nlightalert.notify(\"Hello world!\", \"https://example.com/hello.svg\", \"bg-black\")\n\nlightalert.notify(\"Hello world!\", \"https://example.com/hello.svg\", \"bg-success\")\n\nlightalert.notify(\"Hello world!\", \"https://example.com/hello.svg\", \"bg-warning\")\n\nlightalert.notify(\"Hello world!\", \"https://example.com/hello.svg\", \"bg-error\")\n\nlightalert.notify(\"Hello world!\", \"https://example.com/hello.svg\", \"bg-info\")\n\nlightalert.notify(\"Hello world!\", \"https://example.com/hello.svg\", \"bg-primary\")\n```\n\nAdd a debounce timer to the service, preventing the user from receiving a notification more than once per x seconds. Makes use of [sessionStorage](https://developer.mozilla.org/en/docs/Web/API/Window/sessionStorage) to persist timer countdown across page loads.\n\n```javascript\nvar lightalert = new NotificationService({\n  $elem: $(\"#notification-stack\"),\n  debounce_seconds: 10\n});\n```\n\nChange the template:\n\n```javascript\nvar lightalert = new NotificationService({\n  $elem: $(\"#notification-stack\"),\n  template: \"\u003cdiv class='notification {{class}} id='{{uid}}'\u003e\u003cimg src='{{imageUrl}}'\u003e{{content}}\u003c/div\u003e'\"\n});\n```\n\nChange whether new notifications are appended or prepended to the stack:\n\n```javascript\nvar lightalert = new NotificationService({\n  $elem: $(\"#notification-stack\"),\n  append: false\n});\n```\n\nThese settings can be changed after instantiation via properties:\n\n```javascript\nlightalert.debounce_seconds = 5;\n```\n\n## Requirements\n\n* Bootstrap 3.3 (For default template, no CSS requirements if you provide your own)\n* jQuery 1.8+\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantman261%2Flightalertjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantman261%2Flightalertjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantman261%2Flightalertjs/lists"}