{"id":22466956,"url":"https://github.com/schalkt/cookie-warn","last_synced_at":"2025-08-02T07:31:15.111Z","repository":{"id":7060534,"uuid":"55443477","full_name":"schalkt/cookie-warn","owner":"schalkt","description":"Simple EU Cookie Law warning","archived":false,"fork":false,"pushed_at":"2025-06-18T21:48:54.000Z","size":3861,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T15:02:15.667Z","etag":null,"topics":["cookie","europe","gdpr","javascript","law","warning"],"latest_commit_sha":null,"homepage":"https://projects.schalk.hu/cookie-warn/demo/index.html","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/schalkt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-04-04T20:42:20.000Z","updated_at":"2025-06-18T21:49:48.000Z","dependencies_parsed_at":"2024-01-16T12:49:08.378Z","dependency_job_id":"773e85cc-589a-4a07-afdd-7bccbee3ec5b","html_url":"https://github.com/schalkt/cookie-warn","commit_stats":{"total_commits":112,"total_committers":5,"mean_commits":22.4,"dds":0.1339285714285714,"last_synced_commit":"350974104a28a62974e90f9911069157793b2a22"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/schalkt/cookie-warn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkt%2Fcookie-warn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkt%2Fcookie-warn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkt%2Fcookie-warn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkt%2Fcookie-warn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schalkt","download_url":"https://codeload.github.com/schalkt/cookie-warn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkt%2Fcookie-warn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267953379,"owners_count":24171398,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cookie","europe","gdpr","javascript","law","warning"],"created_at":"2024-12-06T10:14:45.570Z","updated_at":"2025-08-02T07:31:14.875Z","avatar_url":"https://github.com/schalkt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cookie Warn\n\nEU Cookie Law warning message\n\n[![npm](https://img.shields.io/npm/dt/cookie-warn.svg?style=flat-square)](https://www.npmjs.com/package/cookie-warn)\n[![GitHub issues](https://img.shields.io/github/issues/schalkt/cookie-warn.svg?style=flat-square)](https://github.com/schalkt/cookie-warn/issues)\n[![npm](https://img.shields.io/npm/v/cookie-warn.svg?style=flat-square)](https://www.npmjs.com/package/cookie-warn)\n\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=schalkt_cookie-warn\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=schalkt_cookie-warn)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=schalkt_cookie-warn\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=schalkt_cookie-warn)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=schalkt_cookie-warn\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=schalkt_cookie-warn)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=schalkt_cookie-warn\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=schalkt_cookie-warn)\n\n## Preview\n\n[![preview](https://img.shields.io/badge/preview-click_here-green.svg?style=flat-square)](https://projects.schalk.hu/cookie-warn/demo/)\n\n## Features\n\n- jQuery not required\n- multilanguage support\n- customizable style\n- responsive\n- Bootstrap detect\n- adjustable delay and expire days\n- callback\n\n## Examples\n\n### Example 1\n\n- without parameters\n\n```html\n\u003chtml lang=\"en\"\u003e\n\u003cscript id=\"cookieScript\" type=\"text/javascript\" src=\"../cookie-warn.min.js\"\u003e\u003c/script\u003e\n```\n\n### Example 2\n\n- all parameters\n- texts and links by html lang attribute\n\n```html\n\u003chtml lang=\"en\"\u003e\n\u003cscript\n    id=\"cookieScript\"\n    data-lang-en=\"{\n          'text': 'Our website uses cookies.',\n          'more_text': 'Click here for more information',\n          'more_link': 'https://ec.europa.eu/info/law/law-topic/data-protection_en',\n          'accept_text': 'I accept',\n          'reject_text': 'I reject',\n          'reject_info': 'You can disable unwanted cookies by using this program',\n          'reject_link': 'https://www.ghostery.com/'\n          'close_text': 'Close'\n       },\n    }\" (optional, setup texts and links)\n    data-callback=\"cookieWarnCallback\" (callback function name, optional)\n    data-debug=\"true\" (show debug info in console, optional)\n    data-expire=\"365\" (default 365 day, optional)\n    data-domain=\"*.domain.tld\" (cookie domain, optional)\n    data-path=\"/\" (cookie path, optional)\n    data-secure=\"true\" (cookie secure https, optional)\n    data-delay=\"750\" (default 500, optional)\n    data-class=\"customCookieWarningClass\" (optional)\n    data-style=\"#cookieScriptBox a { color: #ff0000; }\" (optional)\n    type=\"text/javascript\"\n    src=\"../cookie-warn.min.js\"\u003e\n\u003c/script\u003e\n\u003cscript\u003e\n      const cookieWarnCallback = function(accepted) {\n            if (accepted) {\n                  // do something...\n            } else {\n                  // do nothing...\n            }\n      };\n\u003c/script\u003e\n```\n\n### Example 3\n\n- with default parameters\n- texts and links by html lang attribute\n\n```html\n \u003chtml lang=\"en\"\u003e\n\n \u003cscript type=\"text/javascript\" src=\"../cookie-warn.min.js\"\u003e\u003c/script\u003e\n\n \u003cdiv\n     id=\"cookieScript\"\n     data-lang-en=\"{\n           'text':'Our website uses cookies.',\n           'accept_text':'Accept all',\n           'accept_essential_text':'Accept only essential',\n           'more_text':'Click here for more information',\n           'more_link':'https://ec.europa.eu/info/law/law-topic/data-protection_en'\n     }\"\n     data-lang-hu=\"{\n           'text':'Weboldalunk sütiket használ.',\n           'accept_text':'Elfogadom',\n           'more_text':'Kattints ide a bővebb információért',\n           'more_link':'https://ec.europa.eu/info/law/law-topic/data-protection_hu'\n     }\"\u003e\n \u003c/div\u003e\n\n```\n\n## Todo\n\n- accept cookies by types (necessary, all, custom)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschalkt%2Fcookie-warn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschalkt%2Fcookie-warn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschalkt%2Fcookie-warn/lists"}