Skip to content

Commit

Permalink
0.9.9
Browse files Browse the repository at this point in the history
Fixed a bug that prevented the banner from closing on certain mobile browsers
  • Loading branch information
francescomugnai committed Dec 6, 2022
1 parent 9c62d4b commit d9b425e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release Notes

## 0.9.9 (2022-06-12)

### What's improved

- Fixed a bug that prevented the banner from closing on certain mobile browsers

## 0.9.8 (2022-06-26)

### What's improved
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<br/>

![npm](https://img.shields.io/badge/Just%20Good%20Cookies-0.9.8-%23abe1be) ![jsDelivr hits (GitHub)](https://img.shields.io/jsdelivr/gh/hm/francescomugnai/just-good-cookies?color=b8eecc) ![GitHub top language](https://img.shields.io/github/languages/top/francescomugnai/just-good-cookies?color=%23bbf7d0) ![npm bundle size](https://img.shields.io/bundlephobia/min/just-good-cookies?color=%23bbf7d0) ![NPM](https://img.shields.io/npm/l/just-good-cookies?color=%23bbf7d0) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/francescomugnai/just-good-cookies/CodeQL?color=%23bbf7d0) ![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/francescomugnai/just-good-cookies?color=%23bbf7d0)
![npm](https://img.shields.io/badge/Just%20Good%20Cookies-0.9.9-%23abe1be) ![jsDelivr hits (GitHub)](https://img.shields.io/jsdelivr/gh/hm/francescomugnai/just-good-cookies?color=b8eecc) ![GitHub top language](https://img.shields.io/github/languages/top/francescomugnai/just-good-cookies?color=%23bbf7d0) ![npm bundle size](https://img.shields.io/bundlephobia/min/just-good-cookies?color=%23bbf7d0) ![NPM](https://img.shields.io/npm/l/just-good-cookies?color=%23bbf7d0) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/francescomugnai/just-good-cookies/CodeQL?color=%23bbf7d0) ![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/francescomugnai/just-good-cookies?color=%23bbf7d0)

Just Good Cookies (JGC) is a simple (but delicious) cookie consent solution made in vanilla JavaScript.
It is designed to be fast, painless and easy to use.
Expand Down Expand Up @@ -96,7 +96,7 @@ There are 2 ways to use JGC in your projects:
1. Copy this script and paste it on your site (ideally into the head tag)

```js
<script src="https://cdn.jsdelivr.net/gh/francescomugnai/just-good-cookies@0.9.8/dist/justgoodcookies.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/francescomugnai/just-good-cookies@0.9.9/dist/justgoodcookies.min.js"></script>
```

2. Install Tailwind (if you haven't already, see [below](#tailwind))
Expand Down
2 changes: 1 addition & 1 deletion dist/justgoodcookies.esm.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/justgoodcookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*/

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('core-js/modules/es.regexp.exec.js'), require('core-js/modules/es.string.replace.js'), require('core-js/modules/es.object.keys.js'), require('core-js/modules/es.object.entries.js'), require('core-js/modules/es.array.concat.js'), require('core-js/modules/es.object.to-string.js'), require('core-js/modules/web.dom-collections.for-each.js'), require('core-js/modules/es.array.includes.js'), require('core-js/modules/es.string.includes.js'), require('core-js/modules/es.object.values.js'), require('core-js/modules/es.regexp.to-string.js'), require('core-js/modules/es.array.slice.js'), require('core-js/modules/es.string.split.js'), require('core-js/modules/es.string.trim.js'), require('core-js/modules/es.json.stringify.js'), require('core-js/modules/es.regexp.test.js'), require('core-js/modules/es.array.join.js'), require('core-js/modules/es.array.map.js'), require('core-js/modules/es.symbol.js'), require('core-js/modules/es.symbol.description.js'), require('core-js/modules/es.array.iterator.js'), require('core-js/modules/es.string.iterator.js'), require('core-js/modules/web.dom-collections.iterator.js'), require('core-js/modules/web.url.js'), require('core-js/modules/web.url-search-params.js'), require('core-js/modules/es.array.index-of.js'), require('core-js/modules/es.string.match.js')) :
typeof define === 'function' && define.amd ? define(['core-js/modules/es.regexp.exec.js', 'core-js/modules/es.string.replace.js', 'core-js/modules/es.object.keys.js', 'core-js/modules/es.object.entries.js', 'core-js/modules/es.array.concat.js', 'core-js/modules/es.object.to-string.js', 'core-js/modules/web.dom-collections.for-each.js', 'core-js/modules/es.array.includes.js', 'core-js/modules/es.string.includes.js', 'core-js/modules/es.object.values.js', 'core-js/modules/es.regexp.to-string.js', 'core-js/modules/es.array.slice.js', 'core-js/modules/es.string.split.js', 'core-js/modules/es.string.trim.js', 'core-js/modules/es.json.stringify.js', 'core-js/modules/es.regexp.test.js', 'core-js/modules/es.array.join.js', 'core-js/modules/es.array.map.js', 'core-js/modules/es.symbol.js', 'core-js/modules/es.symbol.description.js', 'core-js/modules/es.array.iterator.js', 'core-js/modules/es.string.iterator.js', 'core-js/modules/web.dom-collections.iterator.js', 'core-js/modules/web.url.js', 'core-js/modules/web.url-search-params.js', 'core-js/modules/es.array.index-of.js', 'core-js/modules/es.string.match.js'], factory) :
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('core-js/modules/es.regexp.exec.js'), require('core-js/modules/es.string.replace.js'), require('core-js/modules/es.object.keys.js'), require('core-js/modules/es.object.entries.js'), require('core-js/modules/es.array.concat.js'), require('core-js/modules/es.object.to-string.js'), require('core-js/modules/web.dom-collections.for-each.js'), require('core-js/modules/es.array.includes.js'), require('core-js/modules/es.string.includes.js'), require('core-js/modules/es.object.values.js'), require('core-js/modules/es.array.slice.js'), require('core-js/modules/es.regexp.to-string.js'), require('core-js/modules/es.string.split.js'), require('core-js/modules/es.string.trim.js'), require('core-js/modules/es.json.stringify.js'), require('core-js/modules/es.regexp.test.js'), require('core-js/modules/es.array.join.js'), require('core-js/modules/es.array.map.js'), require('core-js/modules/es.symbol.js'), require('core-js/modules/es.symbol.description.js'), require('core-js/modules/es.array.iterator.js'), require('core-js/modules/es.string.iterator.js'), require('core-js/modules/web.dom-collections.iterator.js'), require('core-js/modules/web.url.js'), require('core-js/modules/web.url-search-params.js'), require('core-js/modules/es.array.index-of.js'), require('core-js/modules/es.string.match.js')) :
typeof define === 'function' && define.amd ? define(['core-js/modules/es.regexp.exec.js', 'core-js/modules/es.string.replace.js', 'core-js/modules/es.object.keys.js', 'core-js/modules/es.object.entries.js', 'core-js/modules/es.array.concat.js', 'core-js/modules/es.object.to-string.js', 'core-js/modules/web.dom-collections.for-each.js', 'core-js/modules/es.array.includes.js', 'core-js/modules/es.string.includes.js', 'core-js/modules/es.object.values.js', 'core-js/modules/es.array.slice.js', 'core-js/modules/es.regexp.to-string.js', 'core-js/modules/es.string.split.js', 'core-js/modules/es.string.trim.js', 'core-js/modules/es.json.stringify.js', 'core-js/modules/es.regexp.test.js', 'core-js/modules/es.array.join.js', 'core-js/modules/es.array.map.js', 'core-js/modules/es.symbol.js', 'core-js/modules/es.symbol.description.js', 'core-js/modules/es.array.iterator.js', 'core-js/modules/es.string.iterator.js', 'core-js/modules/web.dom-collections.iterator.js', 'core-js/modules/web.url.js', 'core-js/modules/web.url-search-params.js', 'core-js/modules/es.array.index-of.js', 'core-js/modules/es.string.match.js'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.justgoodcookies = factory());
})(this, (function () { 'use strict';

Expand Down Expand Up @@ -1400,7 +1400,7 @@
date.setTime(date.getTime() + cookieDuration);
var item = {
value: val,
expiry: date.toString()
expiry: date
};

if (!checkPreference['duration']) {
Expand All @@ -1421,7 +1421,7 @@
delete _getPreferences.duration;
var _item = {
value: "1",
expiry: date.toString()
expiry: date
};
saveObj = _objectSpread2(_objectSpread2({}, _getPreferences), {}, {
duration: _item
Expand Down
2 changes: 1 addition & 1 deletion dist/justgoodcookies.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function checkCookieExpiration(val){
let saveObj = {}
let date = new Date();
date.setTime(date.getTime() + cookieDuration);
let item = { value: val, expiry: date.toString() }
let item = { value: val, expiry: date }
if(!checkPreference['duration']) {
let getPreferences = getCookie('JgcPreferences');
const uniqueId = Date.now() + Math.random().toString(16).slice(2)
Expand All @@ -22,7 +22,7 @@ export function checkCookieExpiration(val){
if (now.setHours(0, 0, 0, 0) >= storedData.setHours(0, 0, 0, 0)) {
let getPreferences = getCookie('JgcPreferences');
delete getPreferences.duration;
let item = { value: "1", expiry: date.toString() }
let item = { value: "1", expiry: date }
saveObj = {...getPreferences, duration: item}
saveCookie(saveObj)
showBanner()
Expand Down
2 changes: 1 addition & 1 deletion src/justgoodcookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@license
JustGoodCookies
Created by Francesco Mugnai
2022 - v 0.9.8
2022 - v 0.9.9
Released under MIT License
If you use this script, you will always remain the sole responsible party, use it at your own risk
https://github.com/francescomugnai/just-good-cookies
Expand Down

0 comments on commit d9b425e

Please sign in to comment.