forked from relytred/relytred.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayground-snippet-atlas.html
237 lines (212 loc) · 8 KB
/
playground-snippet-atlas.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<html>
<head>
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self' https: localhost:*; script-src 'unsafe-inline' 'unsafe-eval' https: localhost:*; connect-src https: localhost:* ws://localhost:*; style-src 'unsafe-inline' https:; object-src 'none';"> -->
<title>BTS Fan Club</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<style>
body {
margin: 0;
padding: 0;
height: auto;
width: 100%;
}
button {
background-image: linear-gradient(to bottom, #FF0000 1px, #0000FF 100%);
}
.addAlert {
color: white;
padding: 16px;
background-image: linear-gradient(to bottom, white 1px, black 100%);
}
.unhideElement {
color: white;
padding: 16px;
background-image: linear-gradient(to bottom, darkblue 1px, white 100%);
}
.title {
width: 100%;
text-align: center;
font-size: 20px;
font-weight: bold;
margin-top: 10px;
margin-bottom: 20px;
}
.alert {
width: 100%;
font-size: 16px;
font-weight: bold;
margin-top: 10px;
margin-bottom: 20px;
background: magenta;
}
.hidden {
width: 100%;
font-size: 16px;
font-weight: bold;
margin-top: 10px;
margin-bottom: 20px;
background: darkblue;
color: white;
visibility: hidden;
}
.hidden.unhidden {
visibility: visible;
}
.blockedP {
display: block;
}
.input {
width: 100px;
}
.labels::before {
content: "::before - ";
color: red;
}
.labels::after {
content: " - ::after";
color: blue;
}
hr {
opacity: .2;
}
</style>
<script>
function addAlert() {
const ele = document.createElement('div');
ele.innerText = 'This alert will hide after a lil bit';
ele.className = 'alert';
ele.setAttribute('id', 'alert');
document.body.appendChild(ele);
setTimeout(() => ele.remove(), 10000)
}
function unhideElement() {
const ele = document.getElementsByClassName('hidden')[0];
const btn = document.getElementsByClassName('unhideElement')[0];
if (ele.classList.contains('unhidden')) {
ele.classList.remove('unhidden');
btn.innerHTML = "Show yourself!";
} else {
ele.classList.add('unhidden');
btn.innerHTML = "Ok, go away";
}
}
const events = [
'change',
'input',
'keydown',
'keyup',
'keypress'
];
function changeEvent(event, type) {
console.log('input changeEvent', type, event);
};
setTimeout(() => {
const input = document.getElementById('myInput');
events.forEach(type => {
const handler = (e) => changeEvent(e, type);
input.addEventListener(type, handler);
});
}, 1000);
</script>
<script>
(function (apiKey) {
(function (p, e, n, d, o) {
var v, w, x, y, z; o = p[d] = p[d] || {}; o._q = o._q || [];
v = ['initialize', 'identify', 'updateOptions', 'pageLoad', 'track']; for (w = 0, x = v.length; w < x; ++w)(function (m) {
o[m] = o[m] || function () { o._q[m === v[0] ? 'unshift' : 'push']([m].concat([].slice.call(arguments, 0))); };
})(v[w]);
y = e.createElement(n); y.async = !0; y.src = 'https://cdn.pendo-atlas.pendo-dev.com/agent/static/' + apiKey + '/pendo.js';
z = e.getElementsByTagName(n)[0]; z.parentNode.insertBefore(y, z);
})(window, document, 'script', 'pendo');
// This function creates visitors and accounts in Pendo
// You will need to replace <visitor-id-goes-here> and <account-id-goes-here> with values you use in your app
// Please use Strings, Numbers, or Bools for value types.
pendo.initialize({
visitor: {
// id: // Required if user is logged in
// email: // Recommended if using Pendo Feedback, or NPS Email
// full_name: // Recommended if using Pendo Feedback
// role: // Optional
// You can add any additional visitor level key-values here,
// as long as it's not one of the above reserved names.
},
account: {
id: 'ACCOUNT-UNIQUE-ID' // Highly recommended, required if using Pendo Feedback
// name: // Optional
// is_paying: // Recommended if using Pendo Feedback
// monthly_value:// Recommended if using Pendo Feedback
// planLevel: // Optional
// planPrice: // Optional
// creationDate: // Optional
// You can add any additional account level key-values here,
// as long as it's not one of the above reserved names.
}
});
})('bfb464be-e9e4-41d5-5954-37640257ff2e');
</script>
<body>
<main>
<div class="title">Official BTS Fan Club</div>
<div class="buttonHolder">
<p class="blockedP">This button will add an alert to the page </p>
<button class="addAlert" onclick="addAlert()">Add alert!</button>
<p class="blockedP">This button will toggle display a hidden element </p>
<button class="unhideElement" onclick="unhideElement()">Show yourself!</button>
<p class="blockedP">Drop me a like, comment, and subscribe! </p>
<select class="pets">
<option value="">Pick a pet</option>
<option value="dog" class="dogOption">Dog</option>
<option value="cat" class="catOption">Cat</option>
<option value="hamster" class="hamOption">Hamster</option>
<option value="goldfish" class="fishOption">Goldfish</option>
</select>
<div>
<input type="radio" id="html" name="fav_language" value="HTML">
<label for="html">HTML</label><br>
<input type="radio" id="css" name="fav_language" value="CSS">
<label for="css">CSS</label><br>
<input type="radio" id="javascript" name="fav_language" value="JavaScript">
<label for="javascript">JavaScript</label>
</div>
</div>
<region>
<div class="inputHolder">
<p class="blockedP">Valid autofill inputs</p>
<input id="myInput" class="input">
<input class="input" type="date">
<input class="input" type="datetime-local">
<input class="input" type="email">
<input class="input" type="month">
<input class="input" type="number">
<input class="input" type="password">
<input class="input" type="search">
<input class="input" type="tel">
<input class="input" type="text">
<input class="input" type="time">
<input class="input" type="url">
<input class="input" type="week">
<input class="input" type="hidden">
<input class="input" type="range">
</div>
</region>
<div class="inputHolder">
<p class="blockedP">Invalid autofill inputs</p>
<input class="input" type="button">
<input class="input" type="checkbox">
<input class="input" type="color">
<input class="input" type="image">
<input class="input" type="radio">
<input class="input" type="reset">
<input class="input" type="submit">
<input class="input" type="file">
</div>
<div class="labels">
<label id="label">This is a label with something ::before it</label>
</div>
<div class="hidden">
Shhh, this is a hidden element.
</div>
</main>
</body>
</html>