From 651e5e7766ce772e3bbda40479e5467ce0eaa3fb Mon Sep 17 00:00:00 2001 From: Grahame Thomson Date: Wed, 9 Jul 2014 12:34:18 +0100 Subject: [PATCH 01/11] bower.json added --- bower.json | 24 ++++++++++++++++++++++++ bower.json~ | 21 +++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 bower.json create mode 100644 bower.json~ diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..51abfc7 --- /dev/null +++ b/bower.json @@ -0,0 +1,24 @@ +{ + "name": "cookieCuttr", + "version": "0.0.0", + "homepage": "https://github.com/mrgrt/cookieCuttr", + "authors": [ + "Grahame Thomson " + ], + "description": "A tailorable jQuery plugin to deal with the EU Cookie Law.", + "main": [ + "jquery.cookiecuttr.js", + "cookiecuttr.css" + ], + "keywords": [ + "cookie" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/bower.json~ b/bower.json~ new file mode 100644 index 0000000..ae14b8d --- /dev/null +++ b/bower.json~ @@ -0,0 +1,21 @@ +{ + "name": "cookieCuttr", + "version": "0.0.0", + "homepage": "https://github.com/mrgrt/cookieCuttr", + "authors": [ + "Grahame Thomson " + ], + "description": "A tailorable jQuery plugin to deal with the EU Cookie Law.", + "main": "jquery.cookiecuttr.js", + "keywords": [ + "cookie" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} From 6cd198fe23ede2e660e0d57dbeb7dbce690f4234 Mon Sep 17 00:00:00 2001 From: Grahame Thomson Date: Wed, 9 Jul 2014 12:41:39 +0100 Subject: [PATCH 02/11] added jQuery dependency --- bower.json | 5 ++++- bower.json~ | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 51abfc7..f611a6f 100644 --- a/bower.json +++ b/bower.json @@ -20,5 +20,8 @@ "bower_components", "test", "tests" - ] + ], + "dependencies": { + "jquery": ">= 1.9.0" + } } diff --git a/bower.json~ b/bower.json~ index ae14b8d..f611a6f 100644 --- a/bower.json~ +++ b/bower.json~ @@ -6,7 +6,10 @@ "Grahame Thomson " ], "description": "A tailorable jQuery plugin to deal with the EU Cookie Law.", - "main": "jquery.cookiecuttr.js", + "main": [ + "jquery.cookiecuttr.js", + "cookiecuttr.css" + ], "keywords": [ "cookie" ], @@ -17,5 +20,8 @@ "bower_components", "test", "tests" - ] + ], + "dependencies": { + "jquery": ">= 1.9.0" + } } From 6c84787116a470a35200aed4f957cc44396a6c09 Mon Sep 17 00:00:00 2001 From: Grahame Thomson Date: Wed, 9 Jul 2014 12:47:07 +0100 Subject: [PATCH 03/11] added jQuery.cookie dependency --- bower.json | 3 ++- bower.json~ | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index f611a6f..bba3037 100644 --- a/bower.json +++ b/bower.json @@ -22,6 +22,7 @@ "tests" ], "dependencies": { - "jquery": ">= 1.9.0" + "jquery": ">= 1.9.0", + "jquery.cookie" : ">= 1.4.1" } } diff --git a/bower.json~ b/bower.json~ index f611a6f..bba3037 100644 --- a/bower.json~ +++ b/bower.json~ @@ -22,6 +22,7 @@ "tests" ], "dependencies": { - "jquery": ">= 1.9.0" + "jquery": ">= 1.9.0", + "jquery.cookie" : ">= 1.4.1" } } From c6e5413ceb738d504624b4467e457572368e1e37 Mon Sep 17 00:00:00 2001 From: Grahame Thomson Date: Wed, 9 Jul 2014 13:05:02 +0100 Subject: [PATCH 04/11] added more authors --- bower.json | 2 ++ bower.json~ | 1 + demo.html~ | 9 +++++++++ 3 files changed, 12 insertions(+) create mode 100644 demo.html~ diff --git a/bower.json b/bower.json index bba3037..2cb7841 100644 --- a/bower.json +++ b/bower.json @@ -3,6 +3,8 @@ "version": "0.0.0", "homepage": "https://github.com/mrgrt/cookieCuttr", "authors": [ + "weare2ndfloor ", + "Chris Wharton ", "Grahame Thomson " ], "description": "A tailorable jQuery plugin to deal with the EU Cookie Law.", diff --git a/bower.json~ b/bower.json~ index bba3037..47c1382 100644 --- a/bower.json~ +++ b/bower.json~ @@ -3,6 +3,7 @@ "version": "0.0.0", "homepage": "https://github.com/mrgrt/cookieCuttr", "authors": [ + "weare2ndfloor ", "Grahame Thomson " ], "description": "A tailorable jQuery plugin to deal with the EU Cookie Law.", diff --git a/demo.html~ b/demo.html~ new file mode 100644 index 0000000..7311744 --- /dev/null +++ b/demo.html~ @@ -0,0 +1,9 @@ + + + + + Cookie Cuttr + + + + From e7e5b70d569ae8a6952ae631d0a5564245109c14 Mon Sep 17 00:00:00 2001 From: Grahame Thomson Date: Wed, 9 Jul 2014 13:07:08 +0100 Subject: [PATCH 05/11] deleted redundant files --- demo.html~ | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 demo.html~ diff --git a/demo.html~ b/demo.html~ deleted file mode 100644 index 7311744..0000000 --- a/demo.html~ +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Cookie Cuttr - - - - From db441ef9e05080e7016ffcbfa2ba5c4255d582a2 Mon Sep 17 00:00:00 2001 From: Grahame Thomson Date: Wed, 9 Jul 2014 13:10:37 +0100 Subject: [PATCH 06/11] second wipe at removing redundant files --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 6322435f63209b9425c9c1a368f9da4a86d3ed5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%TB{E5FD2tin#QG#L-_s1YZzUg%d(Zz@0u2q|gURD&Uq+XLi?ARHcVrkcxIA zd+gmEyBRtm`XA+iYO2^&NGbg Date: Wed, 9 Jul 2014 13:12:24 +0100 Subject: [PATCH 07/11] fixed usage typo in readme --- README.md | 2 +- README.md~ | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 README.md~ diff --git a/README.md b/README.md index 2aed0df..98ad60a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Dependencies * [jQuery](https://github.com/jquery/jquery) * [jQuery.cookie](https://github.com/carhartl/jquery-cookie) -Useage +Usage ------ Add `jquery.cookiecuttr.js`, after jQuery and jQuery.cookie, and `cookiecuttr.css` to the head of your HTML document. Then call CookieCuttr on document ready. diff --git a/README.md~ b/README.md~ new file mode 100644 index 0000000..98ad60a --- /dev/null +++ b/README.md~ @@ -0,0 +1,112 @@ +CookieCuttr +=========== + +A tailorable jQuery plugin to deal with the EU Cookie Law. + +**We're not accepting any more pull requests, someone else is working on a new version at the moment, when its ready, we'll link it here.** + +Dependencies +------------ + +* [jQuery](https://github.com/jquery/jquery) +* [jQuery.cookie](https://github.com/carhartl/jquery-cookie) + +Usage +------ + +Add `jquery.cookiecuttr.js`, after jQuery and jQuery.cookie, and `cookiecuttr.css` to the head of your HTML document. Then call CookieCuttr on document ready. + +```javascript +$(document).ready(function () { + $.cookieCuttr(); +}); +``` + +For any JavaScript you want to disable, you need to wrap the following if statement around it. + +```javascript +if (jQuery.cookie('cc_cookie_accept') == "cc_cookie_accept") { + // insert the code you do not want to run UNTIL cookies are accepted here +} +``` + +Example with Google Analytics +----------------------------- + +```javascript +if (jQuery.cookie('cc_cookie_accept') == "cc_cookie_accept") { + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document. getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +} +``` + +Alternatively, you can do the following until cookies are declined. + +```javascript +if (jQuery.cookie('cc_cookie_decline') == "cc_cookie_decline") { + // do nothing +} else { + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document. getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +} +``` + +You can also do the following. + +```javascript +if( $.cookieAccepted() ) { + // insert the code you do not want to run UNTIL cookies are accepted here +} +``` + +Read More About EU Cookie Law +----------------------------- + +* [Is the EU's cookie law confusing you too?](http://www.123-reg.co.uk/blog/security-issues/is-the-eus-cookie-law-confusing-you-too/) +* [New EU cookie law (e-Privacy Directive)](http://www.ico.gov.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies.aspx) +* [Cookies – Doing nothing isn't the right answer](http://chriswharton.me/2012/05/cookies-doing-nothing-isnt-the-right-answer/) + +Using WordPress? +---------------- + +A Wordpress version is available [here](http://cookiecuttr.com/wordpress-plugin/). + +Options +------- + +For options, see the [WIKI](/weare2ndfloor/cookieCuttr/wiki/Options). + +Contributing to CookieCuttr +--------------------------- + +* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet +* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it +* Fork the project +* Start a feature/bugfix branch +* Commit and push until you are happy with your contribution +* Initiate a [pull request](https://help.github.com/articles/using-pull-requests) + +Credits +------- + +* [weare2ndfloor](https://github.com/weare2ndfloor) for the plugin +* [unsymbol](https://github.com/unsymbol) for organising the implementation txt into a readme markdown file + +Copyright +--------- + +Copyright (c) 2012 Chris Wharton. See LICENSE.txt for further details. From 6778db0e0b9844afc3110c3a2bd30cffeb3f4c4d Mon Sep 17 00:00:00 2001 From: Grahame Thomson Date: Wed, 9 Jul 2014 13:14:12 +0100 Subject: [PATCH 08/11] removed duplicate files --- README.md~ | 112 ---------------------------------------------------- bower.json~ | 29 -------------- 2 files changed, 141 deletions(-) delete mode 100644 README.md~ delete mode 100644 bower.json~ diff --git a/README.md~ b/README.md~ deleted file mode 100644 index 98ad60a..0000000 --- a/README.md~ +++ /dev/null @@ -1,112 +0,0 @@ -CookieCuttr -=========== - -A tailorable jQuery plugin to deal with the EU Cookie Law. - -**We're not accepting any more pull requests, someone else is working on a new version at the moment, when its ready, we'll link it here.** - -Dependencies ------------- - -* [jQuery](https://github.com/jquery/jquery) -* [jQuery.cookie](https://github.com/carhartl/jquery-cookie) - -Usage ------- - -Add `jquery.cookiecuttr.js`, after jQuery and jQuery.cookie, and `cookiecuttr.css` to the head of your HTML document. Then call CookieCuttr on document ready. - -```javascript -$(document).ready(function () { - $.cookieCuttr(); -}); -``` - -For any JavaScript you want to disable, you need to wrap the following if statement around it. - -```javascript -if (jQuery.cookie('cc_cookie_accept') == "cc_cookie_accept") { - // insert the code you do not want to run UNTIL cookies are accepted here -} -``` - -Example with Google Analytics ------------------------------ - -```javascript -if (jQuery.cookie('cc_cookie_accept') == "cc_cookie_accept") { - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document. getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); -} -``` - -Alternatively, you can do the following until cookies are declined. - -```javascript -if (jQuery.cookie('cc_cookie_decline') == "cc_cookie_decline") { - // do nothing -} else { - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document. getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); -} -``` - -You can also do the following. - -```javascript -if( $.cookieAccepted() ) { - // insert the code you do not want to run UNTIL cookies are accepted here -} -``` - -Read More About EU Cookie Law ------------------------------ - -* [Is the EU's cookie law confusing you too?](http://www.123-reg.co.uk/blog/security-issues/is-the-eus-cookie-law-confusing-you-too/) -* [New EU cookie law (e-Privacy Directive)](http://www.ico.gov.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies.aspx) -* [Cookies – Doing nothing isn't the right answer](http://chriswharton.me/2012/05/cookies-doing-nothing-isnt-the-right-answer/) - -Using WordPress? ----------------- - -A Wordpress version is available [here](http://cookiecuttr.com/wordpress-plugin/). - -Options -------- - -For options, see the [WIKI](/weare2ndfloor/cookieCuttr/wiki/Options). - -Contributing to CookieCuttr ---------------------------- - -* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet -* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it -* Fork the project -* Start a feature/bugfix branch -* Commit and push until you are happy with your contribution -* Initiate a [pull request](https://help.github.com/articles/using-pull-requests) - -Credits -------- - -* [weare2ndfloor](https://github.com/weare2ndfloor) for the plugin -* [unsymbol](https://github.com/unsymbol) for organising the implementation txt into a readme markdown file - -Copyright ---------- - -Copyright (c) 2012 Chris Wharton. See LICENSE.txt for further details. diff --git a/bower.json~ b/bower.json~ deleted file mode 100644 index 47c1382..0000000 --- a/bower.json~ +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "cookieCuttr", - "version": "0.0.0", - "homepage": "https://github.com/mrgrt/cookieCuttr", - "authors": [ - "weare2ndfloor ", - "Grahame Thomson " - ], - "description": "A tailorable jQuery plugin to deal with the EU Cookie Law.", - "main": [ - "jquery.cookiecuttr.js", - "cookiecuttr.css" - ], - "keywords": [ - "cookie" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "dependencies": { - "jquery": ">= 1.9.0", - "jquery.cookie" : ">= 1.4.1" - } -} From 9bc19faf0b8094e71565ac135ac6f29c56a1e1c9 Mon Sep 17 00:00:00 2001 From: Grahame Thomson Date: Wed, 9 Jul 2014 13:27:59 +0100 Subject: [PATCH 09/11] updated install instructions in README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 98ad60a..3dc0a20 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,11 @@ A tailorable jQuery plugin to deal with the EU Cookie Law. **We're not accepting any more pull requests, someone else is working on a new version at the moment, when its ready, we'll link it here.** +Quick start +----------- + +- Install with [Bower](http://bower.io): `bower install bootstrap`. + Dependencies ------------ From cd04c66cbf08b48a3504862de4d8ece1542ca8f6 Mon Sep 17 00:00:00 2001 From: Grahame Thomson Date: Wed, 9 Jul 2014 13:51:36 +0100 Subject: [PATCH 10/11] updated install instructions for installing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3dc0a20..de0a00d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A tailorable jQuery plugin to deal with the EU Cookie Law. Quick start ----------- -- Install with [Bower](http://bower.io): `bower install bootstrap`. +- Install with [Bower](http://bower.io): `bower install git://github.com/mrgrt/cookieCuttr.git`. Dependencies ------------ From 5cb548ace438b9571ab8a83ce78cad30f703120e Mon Sep 17 00:00:00 2001 From: Grahame Thomson Date: Wed, 9 Jul 2014 14:32:28 +0100 Subject: [PATCH 11/11] bower.json main files updated --- bower.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 2cb7841..e33b00a 100644 --- a/bower.json +++ b/bower.json @@ -9,8 +9,8 @@ ], "description": "A tailorable jQuery plugin to deal with the EU Cookie Law.", "main": [ - "jquery.cookiecuttr.js", - "cookiecuttr.css" + "./jquery.cookiecuttr.js", + "./cookiecuttr.css" ], "keywords": [ "cookie"