-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
85 lines (80 loc) · 2.19 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Useful Links</title>
</head>
<body>
<h1>Demo</h1>
<div id="preamble">
<p>
Add kundo-widget-demo = true to local storage in order for widget button
to show up.
</p>
<button
id="add-cookie"
style="border: 1px solid #666; padding: 4px; margin: 4px 0"
>
Add Cookie
</button>
<p>You need to refresh the page for the widget button to show up.</p>
</div>
<!--
<p>
Add kundo-widget-ai = true to local storage to activate
<strong>mad</strong> <span style="font-size: 30px">MAX</span>
<button
id="add-mad-max-cookie"
style="
border: 1px solid #666;
padding: 4px;
margin: 4px 0;
background-color: red;
color: azure;
"
>
Add Cookie
</button>
</p> -->
<script>
document.querySelector("#add-cookie").addEventListener("click", () => {
localStorage.setItem("kundo-widget-demo", true);
alert("Cookie added!");
location.reload();
});
const hasDemoCookie = !!localStorage.getItem("kundo-widget-demo");
if (hasDemoCookie) {
document.querySelector("#preamble").style.display = "none";
}
document
.querySelector("#add-mad-max-cookie")
.addEventListener("click", () => {
localStorage.setItem("kundo-widget-ai", true);
alert("Mad Max ActiVAteD!");
location.reload();
});
</script>
<script>
(function (w, d, s, o, f, js, fjs) {
w["KUNDO_WIDGET"] = o;
(js = d.createElement(s)), (fjs = d.getElementsByTagName(s)[0]);
js.id = o;
js.src = f;
js.async = 1;
fjs.parentNode.insertBefore(js, fjs);
})(
window,
document,
"script",
"kw",
`https://static.kundo.se/widget/kundo-widget.js?t=${Date.now()}`
);
kw = {
primaryColor: "#0C2DD5",
secondaryColor: "#E7EBFE",
customerName: "Kundo",
};
</script>
</body>
</html>