{"id":20100764,"url":"https://github.com/mattbit/biscuit","last_synced_at":"2025-09-03T14:33:51.972Z","repository":{"id":33125035,"uuid":"36764205","full_name":"mattbit/biscuit","owner":"mattbit","description":"A simple, style-free, cookie banner","archived":false,"fork":false,"pushed_at":"2015-10-28T09:15:05.000Z","size":125,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T09:40:39.889Z","etag":null,"topics":[],"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/mattbit.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-06-02T21:55:29.000Z","updated_at":"2019-10-30T00:33:20.000Z","dependencies_parsed_at":"2022-09-12T07:51:41.957Z","dependency_job_id":null,"html_url":"https://github.com/mattbit/biscuit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattbit%2Fbiscuit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattbit%2Fbiscuit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattbit%2Fbiscuit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattbit%2Fbiscuit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattbit","download_url":"https://codeload.github.com/mattbit/biscuit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252633771,"owners_count":21779915,"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":[],"created_at":"2024-11-13T17:17:01.860Z","updated_at":"2025-05-06T06:32:35.653Z","avatar_url":"https://github.com/mattbit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Biscuit\n\nBiscuit is a simple Javascript library to display a cookie law banner.\nIt has no dependency and is style-free.\n\n### Usage\n\nInclude the script in you page:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"biscuit.min.js\"\u003e\u003c/script\u003e\n```\n\nThen initialize the banner:\n\n```js\n    Biscuit.init({\n        cookie: \"biscuit_consent\", // The name of the cookie used to remember the consent\n        expire: 365, // Number of days the cookie will be kept\n        text: \"This website uses cookies ;)\",\n        link: \"/cookie-policy\",\n        link_text: \"More info\",\n        close_text: '\u0026#x2715;', // The close button text\n        hideOnScroll: true,\n        template: '\u003cdiv id=\"cookie-banner\"\u003e{{ text }} \u003cbutton id=\"close-btn\"\u003e{{ close_text }}\u003c/button\u003e\u003c/div\u003e',\n        containerId: 'cookie-banner', // Adjust to your needs if you use a custom template\n        closeButtonId: 'close-btn' \n    });\n```\n\nThe variables available inside the template are `text`, `link`, `link_text`, `close_text`.\n\nYou can also manually remove/insert the banner:\n\n```js\n    var biscuit = Biscuit.init();\n    \n    biscuit.remove(); // Removes the banner (and sets a cookie to remember the consent)\n    biscuit.show(); // Shows the banner\n``` \n\n## To do\n\n- Write tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattbit%2Fbiscuit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattbit%2Fbiscuit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattbit%2Fbiscuit/lists"}