Skip to content

Commit 54a2020

Browse files
committed
Update to version 1.19.0 of tarteaucitron library.
1 parent 570b9d9 commit 54a2020

85 files changed

Lines changed: 8160 additions & 2644 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: AmauriC

js/tarteaucitron/.github/stale.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 20
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 5
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
- active
10+
# Label to use when marking an issue as stale
11+
staleLabel: inactive
12+
# Comment to post when marking an issue as stale. Set to `false` to disable
13+
markComment: >
14+
This issue has been automatically marked as inactive because it has not had
15+
activity for 20 days. It will be closed in 5 days if no further activity occurs.
16+
Thank you for your contributions.
17+
# Comment to post when closing a stale issue. Set to `false` to disable
18+
closeComment: false
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '23 21 * * 2'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [ 'javascript' ]
32+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33+
# Learn more:
34+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v2
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
49+
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v1
54+
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
57+
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
61+
62+
#- run: |
63+
# make bootstrap
64+
# make release
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v2

js/tarteaucitron/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea
2+
.DS_Store

js/tarteaucitron/README.md

Lines changed: 90 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,90 @@
1-
[![](https://data.jsdelivr.com/v1/package/gh/AmauriC/tarteaucitron.js/badge)](https://www.jsdelivr.com/package/gh/AmauriC/tarteaucitron.js)
2-
[![npm](https://img.shields.io/npm/v/tarteaucitronjs.svg)](https://www.npmjs.com/package/tarteaucitronjs) [![GitHub contributors](https://img.shields.io/github/contributors/AmauriC/tarteaucitron.js.svg)](https://github.com/AmauriC/tarteaucitron.js/graphs/contributors)
31

4-
tarteaucitron.js
5-
================
6-
Comply to the european cookie law is simple with the french *tarte au citron*.
2+
[![](https://data.jsdelivr.com/v1/package/npm/tarteaucitronjs/badge)](https://www.jsdelivr.com/package/npm/tarteaucitronjs)
3+
[![npm](https://img.shields.io/npm/v/tarteaucitronjs.svg)](https://www.npmjs.com/package/tarteaucitronjs) [![GitHub contributors](https://img.shields.io/github/contributors/AmauriC/tarteaucitron.js.svg)](https://github.com/AmauriC/tarteaucitron.js/graphs/contributors) [![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/AmauriC)
4+
5+
6+
![alt text](https://tarteaucitron.io/tarteaucitron.png "tarteaucitron.io")
7+
8+
👋 Hey, I'm Amauri, a french dev that build a GDPR friendly cookie manager.
9+
10+
tarteaucitron was initially a simple script for my personal blog (in 2013), a few months later, the Github repository is opened and tarteaucitron is now reliable and recognized.
711

8-
# What is this script?
912
The european cookie law regulates the management of cookies and you should ask your visitors their consent before exposing them to third party services.
1013

1114
Clearly this script will:
1215
- Disable all services by default,
1316
- Display a banner on the first page view and a small one on other pages,
1417
- Display a panel to allow or deny each services one by one,
15-
- Activate services on the second page view if not denied,
1618
- Store the consent in a cookie for 365 days.
1719

1820
Bonus:
1921
- Load service when user click on Allow (without reload of the page),
2022
- Incorporate a fallback system (display a link instead of social button and a static banner instead of advertising).
2123

2224

23-
# Installation guide
24-
[Visit tarteaucitron.io](https://tarteaucitron.io/)
25-
2625

2726
# How to use
2827

2928
```html
30-
<script type="text/javascript" src="/tarteaucitron/tarteaucitron.js"></script>
29+
<script src="/tarteaucitron/tarteaucitron.js"></script>
3130

32-
<script type="text/javascript">
31+
<script>
3332
tarteaucitron.init({
3433
"privacyUrl": "", /* Privacy policy url */
34+
"bodyPosition": "bottom", /* or top to bring it as first element for accessibility */
3535
3636
"hashtag": "#tarteaucitron", /* Open the panel with this hashtag */
3737
"cookieName": "tarteaucitron", /* Cookie name */
3838
39-
"orientation": "middle", /* Banner position (top - bottom) */
39+
"orientation": "middle", /* Banner position (top - bottom - middle - popup) */
40+
41+
"groupServices": false, /* Group services by category */
42+
"showDetailsOnClick": true, /* Click to expand the description */
43+
"serviceDefaultState": "wait", /* Default state (true - wait - false) */
4044
4145
"showAlertSmall": false, /* Show the small banner on bottom right */
4246
"cookieslist": false, /* Show the cookie list */
4347
4448
"showIcon": true, /* Show cookie icon to manage cookies */
49+
// "iconSrc": "", /* Optional: URL or base64 encoded image */
4550
"iconPosition": "BottomRight", /* Position of the icon between BottomRight, BottomLeft, TopRight and TopLeft */
4651
4752
"adblocker": false, /* Show a Warning if an adblocker is detected */
4853
4954
"DenyAllCta" : true, /* Show the deny all button */
5055
"AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */
5156
"highPrivacy": true, /* HIGHLY RECOMMANDED Disable auto consent */
52-
57+
"alwaysNeedConsent": false, /* Ask the consent for "Privacy by design" services */
58+
5359
"handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */
5460
5561
"removeCredit": false, /* Remove credit link */
5662
"moreInfoLink": true, /* Show more info link */
5763
"useExternalCss": false, /* If false, the tarteaucitron.css file will be loaded */
64+
"useExternalJs": false, /* If false, the tarteaucitron.services.js file will be loaded */
5865
59-
//"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for subdomain website */
66+
// "cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for subdomain website */
6067
6168
"readmoreLink": "", /* Change the default readmore link pointing to tarteaucitron.io */
6269
63-
"mandatory": true /* Show a message about mandatory cookies */
70+
"mandatory": true, /* Show a message about mandatory cookies */
71+
"mandatoryCta": true, /* Show the disabled accept button when mandatory on */
72+
73+
// "customCloserId": "", /* Optional a11y: Custom element ID used to open the panel */
74+
75+
"googleConsentMode": true, /* Enable Google Consent Mode v2 for Google ads and GA4 */
76+
77+
"partnersList": false /* Details the number of partners on the popup and middle banner */
6478
});
6579
</script>
6680
```
6781

68-
# Create custom service
82+
# Add a service
83+
[Visit tarteaucitron.io](https://tarteaucitron.io/en/install/)
84+
85+
# Customization
86+
87+
## Create custom service
6988
```js
7089
tarteaucitron.services.mycustomservice = {
7190
"key": "mycustomservice",
@@ -84,3 +103,57 @@ tarteaucitron.services.mycustomservice = {
84103
}
85104
};
86105
```
106+
107+
## Events
108+
109+
The following events are available:
110+
* (document) `{SERVICE_KEY}_added` for each enabled service
111+
* (document) `{SERVICE_KEY}_loaded` for each enabled service
112+
* (document) `{SERVICE_KEY}_allowed` for each service when allowed
113+
* (document) `{SERVICE_KEY}_disallowed ` for each service when disallowed
114+
115+
* (window) `tac.root_available`: the root element with panel has been created, services will be loaded
116+
* (window) `tac.open_alert`
117+
* (window) `tac.close_alert`
118+
* (window) `tac.open_panel`
119+
* (window) `tac.close_panel`
120+
121+
## Customize text
122+
123+
To change a translation, use `tarteaucitronCustomText` variable. It will be merge with the translation shipping with TAC. This variable must be defined before the initialization. For example:
124+
```js
125+
tarteaucitronCustomText = {
126+
'support': {
127+
'title': 'Support client',
128+
},
129+
'close': 'Enregistrer et fermer',
130+
};
131+
tarteaucitron.init(...);
132+
```
133+
134+
There is a special case for engagement text. By the default, the engagement text is _{SERVICE_NAME} is disabled._, however you can change it per service. For example:
135+
```js
136+
tarteaucitronCustomText = {
137+
'engage-twitter': 'Follow us on Twitter!'
138+
};
139+
```
140+
141+
# Thanks to the sponsors 😊
142+
143+
| ![Amaury Cleuziou](https://avatars.githubusercontent.com/u/26336203?v=4&s=60) | | |
144+
|---|---|---|
145+
| [Amaury Cleuziou](https://github.com/MoryCorp) - first sponsor 🎉 | | |
146+
| | | |
147+
148+
149+
# 600M on the pro version
150+
151+
Every month, hundreds of millions of cookies 🍪 are placed after the user's consent or simply refused.
152+
153+
[![jsdelivr](https://tarteaucitron.io/jsdelivr.png)](https://www.jsdelivr.com/package/gh/AmauriC/tarteaucitron.js)
154+
155+
# Used by all type of website
156+
157+
Tarteaucitron has been around for years and is now used by thousands of companies, government sites, web agencies, ... 🦾
158+
159+
[![Builtwith](https://tarteaucitron.io/builtwith.png)](https://trends.builtwith.com/widgets/tarteaucitron.js)

js/tarteaucitron/SECURITY.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
6+
| Version | Supported |
7+
| ------- | ------------------ |
8+
| 1.x | :white_check_mark: |
9+
10+
11+
## Reporting a Vulnerability
12+
13+
Please report any security vulnerabilities to amauri@tarteaucitron.io
14+
I'll get back to you within 24 hours and fix the issue asap.

js/tarteaucitron/advertising.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
/* min ready */
12
tarteaucitronNoAdBlocker = true;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tarteaucitronNoAdBlocker=true;

0 commit comments

Comments
 (0)