Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'data-cookie-notice' HTML attribute, other suggestions / wishlist #4

Closed
2 of 7 tasks
nfreear opened this issue May 29, 2018 · 0 comments
Closed
2 of 7 tasks

Comments

@nfreear
Copy link

nfreear commented May 29, 2018

Hi,

I've got some suggestions for improvements that I hope will benefit most users ... I'll create pull requests as I work through some of these.


Proposed changes / "wishlist"

  1. DONE. Allow configuration options to be set via JSON in a data-cookie-notice HTML attribute on a <script> element, pull Add support for data-cookie-attribute #5;
  2. DONE. Add Travis-CI build and test (qunit etc.), pull Add Travis-CI automated tests #1, Follow-up to pull #1 - move jQuery to devDependencies for clarity #2;
  3. — Add semistandard / ESLint-type tests — Flet/semistandard;
  4. — Accessibility testing and fixes, using e.g. pa11y-ci or grunt-rsids-pa11y;
  5. — Move CSS from style attribute to <style> element, or separate stylesheet — create <style> or <link> via the Javascript — make it easier to override styles;
  6. — Document use of a CDN, e.g. https://unpkg.com in the README;
  7. — Improve the language used in the English translation ;);
  8. … ?

Aims

While working on the proposed fixes, the aim is to:

  1. Maintain the current small size of the Javascript — as near as possible (currently 3.36 kB minified; 9.1 kB un-minified);
  2. Keep the existing straightforward Javascript-based API;
  3. New easy-to-use non-Javascript API (data attribute);

See notes on Google Docs.


Example HTML

Here is an example of using the proposed data-cookie-notice attribute:

<script
  data-cookie-notice='{ "learnMoreLinkEnabled": true, "learnMoreLinkHref": "/privacy.html" }'
  src="https://unpkg.com/cookie-notice@^1/dist/cookie.notice.min.js"
 ></script>
nfreear added a commit to nfreear/cookie-notice that referenced this issue May 30, 2018
nfreear added a commit to nfreear/cookie-notice that referenced this issue May 30, 2018
nfreear added a commit to nfreear/cookie-notice that referenced this issue Jun 2, 2018
… [ci skip]

* Add `files`, bugs, engines  & contributors fields to package JSON;
* Remove Nick's email address from README & bower JSON;
* Validator ~ http://package-json-validator.com/
nfreear added a commit to nfreear/cookie-notice that referenced this issue Jun 2, 2018
nfreear added a commit to nfreear/cookie-notice that referenced this issue Jun 3, 2018
nfreear added a commit to nfreear/cookie-notice that referenced this issue Jun 3, 2018
nfreear added a commit to nfreear/cookie-notice that referenced this issue Jun 3, 2018
nfreear added a commit to nfreear/cookie-notice that referenced this issue Jun 3, 2018
…CAG2AA

* ... in the Grunt Javascript
* Plus, add `live-server` to `peerDependencies` package JSON
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants