Silex icon indicating copy to clipboard operation
Silex copied to clipboard

Cookies Law script

Open AndreaMonzini opened this issue 8 years ago • 8 comments

Any suggestion for an open source Cookie Law script for the pop up statement and link? Could be great if a solution with editable statements was built in Silex.

Thank you

AndreaMonzini avatar Sep 26 '16 01:09 AndreaMonzini

Hi, I have tested https://github.com/dobarkod/cookie-banner It works fine with Silex, and I advise to put it at the bottom to go well with Silex in mobile version Put this script in the "HTML head editor" (view menu)

<script type="text/javascript" id="cookiebanner"
    src="//cookiebanner.eu/js/cookiebanner.min.js"
    data-position="bottom"
    data-message="We use cookies to improve your browsing experience.">
</script>

You will get something like this screenshot from 2016-09-26 14-09-00

lexoyo avatar Sep 26 '16 12:09 lexoyo

I will try it, thank you.

AndreaMonzini avatar Sep 26 '16 12:09 AndreaMonzini

Hi, I'm having trouble with the data-moreinfo variable of this widget, how do i change it? im using it for my privacy policy rather than cookies. But I can't change my Learn More link! Not even by editing the .js!

FranGamer1892 avatar Feb 14 '20 04:02 FranGamer1892

@FranGamer1892 I believe you can add it to the code like this (I read this in the docs here):

<script type="text/javascript" id="cookiebanner"
    src="//cookiebanner.eu/js/cookiebanner.min.js"
    data-moreinfo="https://yoursite.com"
    data-position="bottom"
    data-message="We use cookies to improve your browsing experience.">
</script>

lexoyo avatar Feb 17 '20 17:02 lexoyo

Okay, I'll try it ASAP, I think I really tried that but anyway I'm going to paste it again and see what happens now.

El lun., 17 de feb. de 2020 2:21 p. m., Alex Hoyau [email protected] escribió:

@FranGamer1892 https://github.com/FranGamer1892 I believe you can add it to the code like this (I read this in the docs here https://github.com/dobarkod/cookie-banner):

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/silexlabs/Silex/issues/486?email_source=notifications&email_token=ADEKT6ATDER6KQOLYHM23LLRDLBTHA5CNFSM4CQYHP4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL7FDMA#issuecomment-587092400, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADEKT6HSUWKQV5KZJSUSWPDRDLBTHANCNFSM4CQYHP4A .

FranGamer1892 avatar Feb 18 '20 16:02 FranGamer1892

Alright, now on the Silex preview it works, but on the actual page it doesn't. (Link: https://notindie.servegame.org/)

FranGamer1892 avatar Mar 03 '20 01:03 FranGamer1892

Good! Now it works, thanks! I figured that if I tried to instead host the .js script myself, the widget would actually load. This is the code I used. <script type="text/javascript" id="cookiebanner" src="//notindie.servegame.org/cookiebanner.min.js" data-moreinfo="https://notindie.servegame.org/notIndieGames%20Privacy%20Policy.pdf" data-position="bottom" data-message="By using this webpage's links or services, you agree to our Privacy Policy below."> </script>

FranGamer1892 avatar Mar 03 '20 01:03 FranGamer1892

They changed the script URL, here it is

<script type="text/javascript" id="cookiebanner"
  src="https://cdn.jsdelivr.net/gh/dobarkod/[email protected]/dist/cookiebanner.min.js"></script>

More info here https://github.com/dobarkod/cookie-banner/

lexoyo avatar Aug 18 '20 15:08 lexoyo