{"id":13311596,"url":"https://github.com/ezrarieben/cookie-z","last_synced_at":"2025-08-22T13:35:46.891Z","repository":{"id":47704743,"uuid":"138306339","full_name":"ezrarieben/cookie-z","owner":"ezrarieben","description":"GDPR compliant cookie warning with automated language detection","archived":false,"fork":false,"pushed_at":"2023-04-11T19:33:30.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-17T14:59:36.825Z","etag":null,"topics":["cookie-banner","cookie-banner-javascript","cookie-consent","cookie-consent-javascript","cookie-warning","english","gdpr","gdpr-cookie","german","i18n","jquery-plugin","language-detection","multilingual"],"latest_commit_sha":null,"homepage":null,"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/ezrarieben.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}},"created_at":"2018-06-22T13:31:47.000Z","updated_at":"2023-04-11T19:28:08.000Z","dependencies_parsed_at":"2025-01-29T21:45:07.118Z","dependency_job_id":null,"html_url":"https://github.com/ezrarieben/cookie-z","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezrarieben%2Fcookie-z","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezrarieben%2Fcookie-z/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezrarieben%2Fcookie-z/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezrarieben%2Fcookie-z/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezrarieben","download_url":"https://codeload.github.com/ezrarieben/cookie-z/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245304873,"owners_count":20593626,"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":["cookie-banner","cookie-banner-javascript","cookie-consent","cookie-consent-javascript","cookie-warning","english","gdpr","gdpr-cookie","german","i18n","jquery-plugin","language-detection","multilingual"],"created_at":"2024-07-29T18:02:15.111Z","updated_at":"2025-03-24T16:14:07.642Z","avatar_url":"https://github.com/ezrarieben.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cookie-z\nA jquery plugin that shows a GDPR compliant cookie warning according to the language set on the users device.\u003cbr /\u003e\n\u003cbr /\u003e\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n## Setting up cookie-z\n1. Import the [jQuery library](https://code.jquery.com/ \"jQuery's CDN Page\")\n2. Load the cookie-z script in your HTML after the body\n```html\n\u003cscript type=\"text/javascript\" src=\"jquery.cookie-z.min.js\"\u003e\u003c/script\u003e\n```\n3. Create the template for the cookie warning on your page. Example:\n```html\n\u003cdiv class=\"cookie-warning\"\u003e\n  \u003cdiv class=\"cookie-warning-inner\"\u003e\n    \u003cp class=\"cookie-warning-text\"\u003e\u003c/p\u003e\n    \u003cbutton class=\"cookie-warning-close\"\u003e\u003c/button\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n4. Call the cookie-z plugin on the wrapper of your cookie warning\n```javascript\n$('.cookie-warning').cookiez();\n```\n## Changing defaults\n1. Use JSON to change the options\n    1. Example of disabling automated language detection, setting the default language and changing the animation to fade:\n        ```javascript\n        $('.cookie-warning').cookiez({\n          autoLang: false,\n          defaultLang: 'en',\n          animation: 'fade',\n        });\n        ```\n### Available options\n\u003e **NOTE:** if you set `autoLang` to false it will use the default language's text\n\n\u003e**NOTE:** if you want to overwrite a language use the `customLanguages` JSON Array\n\n| Option                     | Description                                                               | Default value | Var type  |\n| -------------------------- | ------------------------------------------------------------------------- | ------------- | --------- |\n| `autoLang`                 | Turning automated language detection on or off.                           | `true`        | `boolean` |\n| `defaultLang`              | Locale of the language to use if the detected language is not found       | `en`          | `string`  |\n| `animation`                | Change the animation of toggling the cookie warning (`slide` or `fade`)   | `slide`       | `string`  |\n| `fadeTime`                 | Speed of the fade animation (in miliseconds)                              | `350`         | `integer` |\n| `cookieConfName`           | Name of the cookie to set when the user has confirmed         | `cookie-warning-confirmed`| `string`  |\n| `customLanguages.[locale].cookieWarning`| Cookie warning text for a custom language (v1.1.0 supports HTML)    | `null` | `string`  |\n| `customLanguages.[locale].btnClose`   | Confirm button Text for a custom language (v1.1.0 supports HTML)      | `null` | `string`  |\n| `elements.selectors.wrapper`| Selector for the cookie warning wrapper                              | `.cookie-warning` | `string`  |\n| `elements.selectors.text`  | Selector for the element to place the warning into               | `.cookie-warning-text` | `string`  |\n| `elements.selectors.btnClose` | Selector for the element the user clicks on to confirm       | `.cookie-warning-close` | `string`  |\n## Predefined languages\n1. English\n2. German\n### Adding your own language\n1. When calling the cookie-z plugin add the `customLanguages` JSON Array to the parameters as follows:\n```javascript\n  $('.cookie-warning').cookiez({\n      customLanguages: {\n        fb: {\n          cookieWarning: \"foo\",\n          btnClose: \"bar\"\n        }\n      }\n    });\n```\n\u003e **NOTE:** the locale of the language in this example is `fb`. After defining the custom language, you can use it as a default language with the `defaultLang` option.\n---\n[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/made-with-javascript.svg)](https://forthebadge.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezrarieben%2Fcookie-z","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezrarieben%2Fcookie-z","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezrarieben%2Fcookie-z/lists"}