-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
531 lines (488 loc) · 21.2 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
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
<!DOCTYPE html>
<html>
<head>
<title>Take-A-Glance</title>
<script>
window['_fs_debug'] = false;
window['_fs_host'] = 'www.fullstory.com';
window['_fs_org'] = '1Mm7';
window['_fs_namespace'] = 'FS';
(function(m,n,e,t,l,o,g,y){
if (e in m && m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].'); return;}
g=m[e]=function(a,b){g.q?g.q.push([a,b]):g._api(a,b);};g.q=[];
o=n.createElement(t);o.async=1;o.src='https://'+_fs_host+'/s/fs.js';
y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);
g.identify=function(i,v){g(l,{uid:i});if(v)g(l,v)};g.setUserVars=function(v){g(l,v)};
g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
g.clearUserCookie=function(c,d,i){if(!c || document.cookie.match('fs_uid=[`;`]*`[`;`]*`[`;`]*`')){
d=n.domain;while(1){n.cookie='fs_uid=;domain='+d+
';path=/;expires='+new Date(0).toUTCString();i=d.indexOf('.');if(i<0)break;d=d.slice(i+1)}}};
})(window,document,window['_fs_namespace'],'script','user');
</script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script src="take-a-glance.js"></script>
<script src="glance-selector.js"></script>
<link rel="stylesheet" type="text/css" href="take-a-glance.css">
<meta name="viewport" content="width=device-width, initial-scale=.8, maximum-scale=1, user-scalable=0"/> <!--320-->
</head>
<body style="text-align: center;">
<div id="toolbar" >
<div id="labelAndSelector" ">
<div id="findLabel" class=text style="display:inline-block; "></div>
<div id="glanceSelector" class=text style=" ;"></div>
</div>
</div>
<div id="level0" data-selector=" " class="text" style="display:none;">
<h2>Take-A-Glance</h2><p>
Glance is a language that is meant to bridge the gap between code and human description.<p>
"Take a glance" is a game that teaches you the basics of Glance<p>
We will be using Glance to help find objects on the screen<p>
Each level has a label containing a Glance selector pointing to the object you should click on.
<br>For example:<br>
<img class="gif" src="assets/circle.gif" style="transform: scale(0.70, 0.70); vertical-align: text-top;"/>
<div style="display: flex; justify-content: center; "><button id="start" class="button" onclick="start()" ><h1 style="margin:0;">Start</h1></button></div>
</div>
<div id="" data-selector="square" class="container" style="display:none;">
<div class="shape blue square" >
<img class="svg" id="Square"
src="assets/square.svg" onclick="testResult(event)"/>
</div>
</div>
<div id="" data-selector="blue" class="container" style="display:none;">
<div class="shape blue square" >
<img class="svg " id="Square"
src="assets/square.svg" onclick="testResult(event)"/>
</div>
</div>
<div id="" class="container" data-selector="circle" style="display:none;">
<div class="shape blue square" >
<img class="svg " src="assets/square.svg"/>
</div>
<div class="shape yellow circle" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
<div id="" class="container" data-selector="triangle" style="display:none;">
<div class="shape peach circle" >
<img class="svg" src="assets/circle.svg"/>
</div>
<div class="shape blue square" >
<img class="svg" src="assets/square.svg"/>
</div>
<div class="shape yellow triangle" >
<img class="svg" src="assets/triangle.svg"/>
</div>
</div>
<div id="" class="container" data-selector="yellow" style="display:none;">
<div class="shape peach circle" >
<img class="svg" src="assets/circle.svg"/>
</div>
<div class="shape blue square" >
<img class="svg" src="assets/square.svg"/>
</div>
<div class="shape yellow triangle" >
<img class="svg" src="assets/triangle.svg"/>
</div>
</div>
<div id="" class="container" data-selector="triangle" style="display:none;">
<div class="shape purple square " >
<img class="svg" src="assets/square.svg"/>
<div class="shape triangle peach innershape-1" >
<img class="svg" src="assets/triangle.svg"/>
</div>
</div>
<div class="shape yellow square " >
<img class="svg" src="assets/square.svg" style=""/>
<div class="shape blue square innershape-1" >
<img class="svg" src="assets/square.svg" style=""/>
</div>
</div>
</div>
<div id="" class="container" data-selector="blue" style="display:none;">
<div class="shape peach circle " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape square peach innershape-1" >
<img class="svg" src="assets/square.svg"/>
</div>
</div>
<div class="shape peach square " >
<img class="svg" src="assets/square.svg" style=""/>
<div class="shape blue circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
<div id="" data-selector=" " class="container text" style="display:none;">
<button id="continue" class="button" onclick="resume()" style="">Continue</button><p>
Sometimes the description is not enough by itself. <p>
In these cases we want to add context to our selectors <p>
the > sign is used to give our target (on the right side) the relevant scope (on the left) <p>
In the example below, "circle > square" would be instructing the selector to look for a target square that is in the scope of a circle.
</p>
<div class="shape blue circle " >
<img class="svg" src="assets/circle.svg" style=""/>
<div class="shape yellow square innershape-1" >
<img class="svg" src="assets/square.svg" style=""/>
</div>
</div>
<div class="shape purple circle " >
<img class="svg" src="assets/square.svg" style=""/>
<div class="shape peach square innershape-1" >
<img class="svg" src="assets/square.svg" style=""/>
</div>
</div><p>
Since there are multiple square on the screen, we narrowed our scope to the square that is inside the circle.
<p>
</div>
<div id="" class="container" data-selector="square > circle" style="display:none;">
<div class="shape blue square " >
<img class="svg" src="assets/square.svg" style=""/>
<div class="shape yellow circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
<div id="" class="container" data-selector="square > square" style="display:none;">
<div class="shape purple square " >
<img class="svg" src="assets/square.svg"/>
<div class="shape square yellow innershape-1" >
<img class="svg" src="assets/square.svg"/>
</div>
</div>
<div class="shape peach square " >
<img class="svg" src="assets/square.svg" style=""/>
<div class="shape purple circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
<div id="" class="container" data-selector="yellow > blue" style="display:none;">
<div class="shape yellow circle " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape square blue innershape-1" >
<img class="svg" src="assets/square.svg"/>
</div>
</div>
<div class="shape blue circle " >
<img class="svg" src="assets/circle.svg" style=""/>
<div class="shape purple circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
<div id="" class="container" data-selector="circle > circle" style="display:none;">
<div class="shape blue square " >
<img class="svg" src="assets/square.svg"/>
<div class="shape purple circle innershape-1" >
<img class="svg" src="assets/circle.svg"/>
<div class="shape circle peach innershape-1" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
</div>
<div class="shape peach square " >
<img class="svg" src="assets/square.svg" style=""/>
<div class="shape purple circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
<div id="" class="container" data-selector="purple > circle" style="display:none;">
<div class="shape blue square " >
<img class="svg" src="assets/square.svg"/>
<div class="shape purple circle innershape-1" >
<img class="svg" src="assets/circle.svg"/>
<div class="shape circle peach innershape-1" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
</div>
<div class="shape peach square " >
<img class="svg" src="assets/square.svg" style=""/>
<div class="shape purple circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
<div id="" data-selector=" " class="container text" style="display:none;">
<button id="continue" class="button" onclick="resume()" style="">Continue</button><p>
The ^ sign is used for cases where we want to give more information about our object.<p>
In the example below, "circle > square" would be instructing the selector to look for a square that is in the scope of a circle.
<div class="shape blue circle " >
<img class="svg" src="assets/circle.svg" style=""/>
<div class="shape yellow square innershape-1" >
<img class="svg" src="assets/square.svg" style=""/>
</div>
</div>
<div class="shape purple circle " >
<img class="svg" src="assets/square.svg" style=""/>
<div class="shape peach square innershape-1" >
<img class="svg" src="assets/square.svg" style=""/>
</div>
</div><p>
Since there is only one yellow square, We could also describe the square as: <p>
"yellow ^ square", which would be instructing Glance to look for an object which is both yellow and a square
<p>
</div>
<div id="" class="container" data-selector="circle ^ blue" style="display:none;">
<div class="shape blue circle " >
<img class="svg" src="assets/circle.svg"/>
</div>
<div class="shape purple circle" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
<div id="" class="container" data-selector="blue ^ circle" style="display:none;">
<div class="shape blue circle " >
<img class="svg" src="assets/circle.svg"/>
</div>
<div class="shape purple circle" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
<div id="" class="container" data-selector="circle > square" style="display:none;">
<div class="shape blue circle " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape purple square innershape-1" >
<img class="svg" src="assets/square.svg"/>
</div>
</div>
<div class="shape peach square " >
<img class="svg" src="assets/square.svg" style=""/>
<div class="shape purple circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
<div id="" class="container" data-selector="square > circle" style="display:none;">
<div class="shape blue circle " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape purple square innershape-1" >
<img class="svg" src="assets/square.svg"/>
</div>
</div>
<div class="shape peach square " >
<img class="svg" src="assets/square.svg" style=""/>
<div class="shape purple circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
<div id="" class="container" data-selector="circle ^ blue" style="display:none;">
<div class="shape blue square" >
<img class="svg" src="assets/square.svg"/>
<div class="shape blue circle innershape-1" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
<div class="shape purple circle" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
<div id="" class="container" data-selector="square > circle" style="display:none;">
<div class="shape blue square" >
<img class="svg" src="assets/square.svg"/>
<div class="shape blue circle innershape-1" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
<div class="shape purple circle" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
<div id="" class="container" data-selector="purple ^ square" style="display:none;">
<div class="shape circle blue " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape purple square innershape-1" >
<img class="svg" src="assets/square.svg"/>
<div class="shape triangle peach innershape-1" >
<img class="svg" src="assets/triangle.svg"/>
</div>
</div>
</div>
<div class="shape peach square " >
<img class="svg " src="assets/square.svg" style=""/>
<div class="shape purple circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
<div id="" data-selector=" " class="container text" style="display:none;">
<button id="continue" class="button" onclick="resume()" style="">Continue</button><p>
The # sign is used to extend our selector, narrowing down which objects it describes.<p>
One of the common uses is when we cannot find a way to differentiate between identical elements, we can tell it to choose a specific one by designating it's place.<p>
In the example below, the two square are identical, so we can reference the second square by using:<p>
"square#2"
<div class="shape blue square " >
<img class="svg" src="assets/square.svg" style=""/>
</div>
<div class="shape blue square " >
<img class="svg" src="assets/square.svg" style=""/>
</div><p>
</div>
<div id="" class="container" data-selector="circle#2" style="display:none;">
<div class="shape circle yellow " >
<img class="svg" src="assets/circle.svg"/>
</div>
<div class="shape circle yellow " >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
<div id="" class="container" data-selector="circle#2" style="display:none;">
<div class="shape circle blue " >
<img class="svg" src="assets/circle.svg"/>
</div>
<div class="shape circle yellow " >
<img class="svg" src="assets/circle.svg"/>
</div>
<div class="shape circle peach " >
<img class="svg" src="assets/circle.svg"/>
</div>
<div class="shape circle purple " >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
<div id="" class="container" data-selector="circle#2" style="display:none;">
<div class="shape circle blue " >
<img class="svg" src="assets/circle.svg"/>
</div>
<div class="shape triangle yellow " >
<img class="svg" src="assets/triangle.svg"/>
</div>
<div class="shape square peach " >
<img class="svg" src="assets/square.svg"/>
</div>
<div class="shape circle purple " >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
<div id="" class="container" data-selector="peach#2 ^ circle" style="display:none;">
<div class="shape circle blue " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape square yellow innershape-1" >
<img class="svg" src="assets/square.svg"/>
<div class="shape circle peach innershape-1 " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape triangle purple innershape-1" >
<img class="svg" src="assets/triangle.svg"/>
</div>
</div>
</div>
</div>
<div class="shape circle blue " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape circle yellow innershape-1" >
<img class="svg" src="assets/circle.svg"/>
<div class="shape circle peach innershape-1 " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape circle purple innershape-1" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
</div>
</div>
</div>
<div id="" class="container" data-selector="peach ^ circle#2" style="display:none;">
<div class="shape circle blue " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape square yellow innershape-1" >
<img class="svg" src="assets/square.svg"/>
<div class="shape circle peach innershape-1 " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape triangle purple innershape-1" >
<img class="svg" src="assets/triangle.svg"/>
</div>
</div>
</div>
</div>
<div class="shape circle blue " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape circle yellow innershape-1" >
<img class="svg" src="assets/circle.svg"/>
<div class="shape circle peach innershape-1 " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape circle purple innershape-1" >
<img class="svg" src="assets/circle.svg"/>
</div>
</div>
</div>
</div>
</div>
<div id="" class="container" data-selector="peach ^ circle#2 > square" style="display:none;">
<div class="shape circle blue " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape square yellow innershape-1" >
<img class="svg" src="assets/square.svg"/>
<div class="shape circle peach innershape-1 " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape triangle purple innershape-1" >
<img class="svg" src="assets/triangle.svg"/>
</div>
</div>
</div>
</div>
<div class="shape circle blue " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape circle yellow innershape-1" >
<img class="svg" src="assets/circle.svg"/>
<div class="shape circle peach innershape-1 " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape square purple innershape-1" >
<img class="svg" src="assets/square.svg"/>
</div>
</div>
</div>
</div>
</div>
<div id="" class="container" data-selector="circle > square > circle" style="display:none;">
<div class="shape circle yellow " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape peach square innershape-1" >
<img class="svg" src="assets/square.svg"/>
<div class="shape blue square innershape-1" >
<img class="svg " src="assets/square.svg" style=""/>
<div class="shape blue circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
</div>
</div>
<div id="" class="container" data-selector="circle > circle" style="display:none;">
<div class="shape circle yellow " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape peach square innershape-1" >
<img class="svg" src="assets/square.svg"/>
<div class="shape blue square innershape-1" >
<img class="svg " src="assets/square.svg" style=""/>
<div class="shape blue circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
</div>
</div>
<div id="" class="container" data-selector="blue ^ circle" style="display:none;">
<div class="shape circle yellow " >
<img class="svg" src="assets/circle.svg"/>
<div class="shape peach square innershape-1" >
<img class="svg" src="assets/square.svg"/>
<div class="shape blue square innershape-1" >
<img class="svg " src="assets/square.svg" style=""/>
<div class="shape blue circle innershape-1" >
<img class="svg" src="assets/circle.svg" style=""/>
</div>
</div>
</div>
</div>
</div>
<div id="" data-selector=" " class="container text" style="display:none; text-align: center;">
<p><p>
Thank you for playing.<P>
If you would like to know more about Glance <p>
visit this <a href="http://quasimatic.org/glance/" style="color: blue; text-decoration: inherit;">website<a>
<p>
</div>
</body>
</html>