Skip to content

Commit e5d1d67

Browse files
authored
Merge pull request jsonwebtoken#637 from jsonwebtoken/PC-9
2 parents dc895ad + 0c31c8e commit e5d1d67

File tree

4 files changed

+73
-4
lines changed

4 files changed

+73
-4
lines changed

src/website/ccpa-modal.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export function CCPAModal() {
2+
document.addEventListener("DOMContentLoaded", function () {
3+
if(window.location.hash.includes('your-privacy-choices')) {
4+
document.querySelector("#ccpa-modal").style.display = "block";
5+
}
6+
document.querySelector("#open-ccpa").addEventListener("click", () => {
7+
document.querySelector("#ccpa-modal").style.display = "block";
8+
});
9+
10+
document.querySelector("#close-ccpa").addEventListener("click", () => {
11+
document.querySelector("#ccpa-modal").style.display = "none";
12+
});
13+
});
14+
}

src/website/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
shareJwtButton,
1111
shareJwtTextElement,
1212
} from "./dom-elements.js";
13+
import { CCPAModal } from "./ccpa-modal.js";
1314

1415
import queryString from "querystring";
1516

@@ -52,4 +53,5 @@ setupTokenEditor();
5253
parseLocationQuery();
5354
setupHighlighting();
5455
setupJwtCounter();
55-
setupShareJwtButton(shareJwtButton, shareJwtTextElement);
56+
setupShareJwtButton(shareJwtButton, shareJwtTextElement);
57+
CCPAModal();

stylus/website/index.styl

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,13 @@ footer
12401240
color white
12411241
img
12421242
margin-left 5px
1243+
.as-anchor
1244+
color: white
1245+
background: none
1246+
padding: 0
1247+
border: none
1248+
.ccpa-toggle
1249+
max-width: 39px
12431250

12441251
.logo
12451252
height 18px
@@ -1265,6 +1272,39 @@ footer
12651272
+breakpoint("tablet")
12661273
text-align right
12671274

1275+
#ccpa-modal
1276+
display: none
1277+
position: fixed
1278+
top: 50%
1279+
left: 50%
1280+
transform: translate(-50%, -50%)
1281+
width: 90%
1282+
height: auto
1283+
background: white
1284+
z-index: 10000
1285+
color: black
1286+
border-radius: 16px
1287+
padding: 24px
1288+
text-align: left
1289+
+breakpoint("tablet")
1290+
width: 50%
1291+
max-width: 670px
1292+
#close-ccpa
1293+
background: none
1294+
border: none
1295+
padding: 0
1296+
position: absolute
1297+
top: 20px
1298+
right: 30px
1299+
font-size: 24px
1300+
line-height: 24px
1301+
.settings
1302+
color: #635dff
1303+
appearance: none
1304+
border: none
1305+
background: none
1306+
padding: 0
1307+
12681308
.warning
12691309
display block
12701310
width 100%

views/website/layout.pug

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ html(lang='en')
3737

3838
// Chrome extension link, required for inline installs
3939
link(rel="chrome-webstore-item", href="https://chrome.google.com/webstore/detail/ppmmlchacdbknfphdeafcbmklcghghmd")
40-
40+
4141
body
4242
// Google Tag Manager (noscript)
4343
noscript
4444
iframe(src='https://www.googletagmanager.com/ns.html?id=GTM-W7FRLJ', height='0', width='0', style='display:none;visibility:hidden')
45-
45+
4646
include ./navigation.pug
47-
47+
4848
block content
4949

5050
footer
@@ -57,9 +57,22 @@ html(lang='en')
5757
span •
5858
a(href='https://auth0.com/web-terms', target="_blank")
5959
| Terms of Service
60+
span •
61+
button.as-anchor#open-ccpa
62+
| Your Privacy Choices
63+
img.ccpa-toggle(src='https://cdn.auth0.com/website/footer/ccpa.svg' alt='Privacy choices')
6064
a(href='https://auth0.com/developers/', target="_blank")
6165
| Supported by
6266
img(src='/img/ico_logo.svg' alt='Supported by Auth0 - JWT.io Token Based Authentication').logo
67+
#ccpa-modal
68+
button#close-ccpa x
69+
h3 Your Privacy Choices
70+
p Depending on your state of residence, including if you are a California resident, you have the right to opt out of certain sharing of personal information with third-party ad partners. We may share personal information with third-party ad partners, such as through cookies or by providing lists of email addresses for potential customers, so that we can reach them across the web with relevant ads.
71+
p If you wish to opt out of this sharing of your personal data in connection with cookies, please update your
72+
button.settings(onClick="window.OneTrust.ToggleInfoDisplay()") cookie settings.
73+
p If you wish to opt out of email-based sharing, provide your email address at
74+
a.settings(href="https://www.okta.com/your-privacy-choices/", target="_blank") this link.
75+
6376
.column.pull-request
6477
span Missing something?
6578
a(href='https://github.com/jsonwebtoken/jsonwebtoken.github.io/tree/master/views', target="_blank") Send a Pull Request

0 commit comments

Comments
 (0)