Logo Iubenda

Iubenda, check consent given in javascript

Simple script to check if user have given consent to Iubenda privacy/cookie policy. Function will return true if user has given consent, false otherwise.

Semplice script per verificare se l’utente ha dato il consenso alla privacy / cookie policy di Iubenda. La funzione restituirà true se l’utente ha dato il consenso, altrimenti falso.

Event style use:

 

JS/CSS Moon Phases snippet

Simple script to generate moon phases ( https://en.wikipedia.org/wiki/Lunar_phase )

It uses 2 SVG (2 hemispheres) and some CSS transformation.

You can avoid JS if you don’t need real-time phase update.

HTML code

 

CSS

 

and JS code. The code is prolix and redundant, but it helps to understand what happens.

 

and here the result

See the Pen JS/CSS Moon Phases by Diego Betto (@agm65) on CodePen.dark