Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
1302 lines (1052 loc) · 79.8 KB
/
Copy pathscript.js
File metadata and controls
1302 lines (1052 loc) · 79.8 KB
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
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
var app = document.getElementById('app');
var apath, aname = 'Hello World', asubtitle = '', adescription = ''; aversion = '1.0.0', atype = 'web', dname = 'shifat100', durl = 'http://shifat100.xtgem.com', aorigin = 'app://ebook-maker.app', pubid = '080b82ab-b33a-4763-a498-50f464567e49', aicon = '', aicon56 = '', aicon112 = '', aicon128 = '';
//get file extension
function fileExtention(filename) {
var fsplit = filename.split('.');
var extention = fsplit[fsplit.length - 1];
return extention;
}
//get base file Name
function baseFileName(filename) {
var s = filename.split('/');
var name = s[s.length - 1];
return name.replace('.txt', '');
}
function validKaiStorage() {
try {
navigator.getDeviceStorages('sdcard')[0];
} catch (e) {
return false;
}
return true;
}
function imageToDataUri(imgdat) {
var img = document.createElement('img');
img.src = imgdat;
img.onload = function () {
var canvas = document.createElement('canvas'),
ctx = canvas.getContext('2d');
canvas.width = 56;
canvas.height = 56;
ctx.drawImage(img, 5, 5, (56 - 10), (56 - 10));
aicon56 = canvas.toDataURL();
var canvas = document.createElement('canvas'),
ctx = canvas.getContext('2d');
canvas.width = 112;
canvas.height = 112;
ctx.drawImage(img, 5, 5, (112 - 10), (112 - 10));
aicon112 = canvas.toDataURL();
var canvas = document.createElement('canvas'),
ctx = canvas.getContext('2d');
canvas.width = 128;
canvas.height = 128;
ctx.drawImage(img, 5, 5, (128 - 10), (128 - 10));
aicon128 = canvas.toDataURL();
}
}
var filelist = document.getElementById('app');
if (validKaiStorage()) { var sdcards = navigator.getDeviceStorages('sdcard'); }
function main() {
app.innerHTML = '';
if (sdcards.length == 2) { externalCard(); } else { internalCard(); }
}
function internalCard() {
var sd = navigator.getDeviceStorages('sdcard')[0];
var ti = 0;
var cursor = sd.enumerate();
cursor.onsuccess = function () {
if (this.result.name.lastIndexOf('.txt') === this.result.name.length - 4 || this.result.name.lastIndexOf('.TXT') === this.result.name.length - 4) {
var file = this.result;
var filename = file.name;
var filepath = filename.replace('/sdcard/', '');
var item = document.createElement('div');
item.className = 'listview file';
item.tabIndex = ti;
ti++;
item.innerHTML = '<img src = "ext.png" style="width: 20px;vertical-align: middle;margin-right: 5px">'+baseFileName(file.name.substring(file.name.lastIndexOf('/') + 1));
item.addEventListener('click', function () {
machine(file);
});
if (app.appendChild(item)) {
app.style.display = 'block';
document.getElementById('nofilenotice').style.display = 'none';
app.appendChild(item);
app.style = 'z-index: 1';
} else {
app.style.display = 'none';
document.getElementById('nofilenotice').style.display = 'block';
app.style = 'z-index: 0';
}
}
if (!this.done) {
this.continue();
}
}
cursor.onerror = function () {
console.warn('No file found: ' + this.error);
app.innerHTML = 'No file found: ' + this.error;
}
document.body.addEventListener('keydown', function (e) {
if (e.key == 'SoftLeft' || e.key == 'F1') { window.location.href = 'create/index.html'; }
if (e.key == 'SoftRight' || e.key == 'F2') { if (window.confirm('Are You Sure ?')) { window.close(); } }
});
}
function externalCard() {
var sd = navigator.getDeviceStorages('sdcard')[0];
var ti = 0;
var cursor = sd.enumerate();
cursor.onsuccess = function () {
if (this.result.name.lastIndexOf('.txt') === this.result.name.length - 4 || this.result.name.lastIndexOf('.TXT') === this.result.name.length - 4) {
var file = this.result;
var filename = file.name;
var filepath = filename.replace('/sdcard/', '');
var item = document.createElement('div');
item.className = 'listview file';
item.tabIndex = ti;
ti++;
item.innerHTML = '<img src = "ext.png" style="width: 20px;vertical-align: middle;margin-right: 5px">'+baseFileName(file.name.substring(file.name.lastIndexOf('/') + 1));
item.addEventListener('click', function () {
machine(file);
});
if (app.appendChild(item)) {
app.style.display = 'block';
document.getElementById('nofilenotice').style.display = 'none';
app.appendChild(item);
app.style = 'z-index: 1';
} else {
app.style.display = 'none';
document.getElementById('nofilenotice').style.display = 'block';
app.style = 'z-index: 0';
}
}
if (!this.done) {
this.continue();
}
}
cursor.onerror = function () {
console.warn('No file found: ' + this.error);
app.innerHTML = 'No file found: ' + this.error;
}
sd = navigator.getDeviceStorages('sdcard')[1];
var cursor = sd.enumerate();
cursor.onsuccess = function () {
if (this.result.name.lastIndexOf('.txt') === this.result.name.length - 4 || this.result.name.lastIndexOf('.TXT') === this.result.name.length - 4) {
var file = this.result;
var filename = file.name;
var filepath = filename.replace('/sdcard/', '');
var item = document.createElement('div');
item.className = 'listview file';
item.tabIndex = ti;
ti++;
item.innerHTML = '<img src = "ext.png" style="width: 20px;vertical-align: middle;margin-right: 5px">'+baseFileName(file.name.substring(file.name.lastIndexOf('/') + 1));
item.addEventListener('click', function () {
machine(file);
});
if (app.appendChild(item)) {
app.style.display = 'block';
document.getElementById('nofilenotice').style.display = 'none';
app.appendChild(item);
app.style = 'z-index: 1';
} else {
app.style.display = 'none';
document.getElementById('nofilenotice').style.display = 'block';
app.style = 'z-index: 0';
}
}
if (!this.done) {
this.continue();
}
}
cursor.onerror = function () {
console.warn('No file found: ' + this.error);
app.innerHTML = 'No file found: ' + this.error;
}
document.body.addEventListener('keydown', function (e) {
if (e.key == 'SoftLeft' || e.key == 'F1') { window.location.href = 'create/index.html'; }
if (e.key == 'SoftRight' || e.key == 'F2') { if (window.confirm('Are You Sure ?')) { window.close(); } }
});
}
function machine(file) {
var reader = new FileReader();
reader.onload = function () {
var str = this.result;
var html = `<div class="group"><div class="titlebar">App Details</div><div class="contentbar">
<label for="appname">App Name:</label><input type="text" placeholder="Hello World" id="appname" class="focusable" tabindex="0">
<label for="appversion">App Version:</label><input type="text" placeholder="1.0.0" id="appversion" class="focusable" tabindex="1">
<label for="appsubtitle">App Subtitle:</label><input type="text" placeholder="Created With Ebook Maker 1.0.0" id="appsubtitle" class="focusable" tabindex="2">
<label for="appdescription">App Description:</label><input type="text" placeholder="Best Ebook Maker for Kaios, Easy Access, Full Key Control" id="appdescription" class="focusable" tabindex="3">
<label for="appicon">App icon:</label><input type="file" id="appicon" class="focusable" tabindex="4" accept=".png, .jpg, .gif">
<input type="submit" class="submitbtn" id="submit" class="focusable" tabindex="5" value="Next"></div></div>`;
app.innerHTML = html;
var appname = document.getElementById('appname');
var appversion = document.getElementById('appversion');
var appsubtitle = document.getElementById('appsubtitle');
var appdescription = document.getElementById('appdescription');
var appicon = document.getElementById('appicon');
var submitbtn = document.getElementsByClassName('submitbtn')[0];
appname.addEventListener('keyup', function () {
var patt = /[.,!@#$%^&*():;'"?\/\\=\[\]\+\{\}]/; if (this.value != '' && patt.test(this.value) == false) { this.style = 'background:green;color:white'; aname = this.value; if (appversion.value != '' && appsubtitle.value != '' && appdescription.value != '' && appicon.value != '') { submitbtn.style.display = 'block'; } }
else { this.style = 'background:red;color: white'; submitbtn.style.display = 'none'; };
});
appversion.addEventListener('keyup', function () {
var patt = /^[0-9]((\.)[0-9]){0,2}$/;
if (this.value != '' && patt.test(this.value) == true) { this.style = 'background:green;color:white'; aversion = this.value; if (appname.value != '' && appsubtitle.value != '' && appdescription.value != '' && appicon.value != '') { submitbtn.style.display = 'block'; } }
else { this.style = 'background:red;color: white'; submitbtn.style.display = 'none'; };
});
appsubtitle.addEventListener('keyup', function () {
var patt = /['"\\]/;
if (this.value != '' && patt.test(this.value) == false) { this.style = 'background:green;color:white'; asubtitle = this.value; if (appname.value != '' && appversion.value != '' && appdescription.value != '' && appicon.value != '') { submitbtn.style.display = 'block'; } }
else { this.style = 'background:red;color: white'; submitbtn.style.display = 'none'; };
});
appdescription.addEventListener('keyup', function () {
var patt = /['"\\]/;
if (this.value != '' && patt.test(this.value) == false) { this.style = 'background:green;color:white'; adescription = this.value; if (appname.value != '' && appversion.value != '' && appsubtitle.value != '' && appicon.value != '') { submitbtn.style.display = 'block'; } }
else { this.style = 'background:red;color: white'; submitbtn.style.display = 'none'; };
});
appicon.addEventListener('change', function () {
if (this.value != '') {
this.style = 'background:green;color:white';
var ele = document.querySelector('input[type=file]')['files'][0];
var reader = new FileReader();
reader.onload = function () {
aicon = this.result;
imageToDataUri(aicon);
}
reader.readAsDataURL(ele);
if (appname.value != '' && appversion.value != '' && appsubtitle.value != '' && appicon.value != '') { submitbtn.style.display = 'block'; }
}
else { this.style = 'background:red;color: white'; submitbtn.style.display = 'none'; };
});
submitbtn.addEventListener('keyup', function () {
//developer details
html = `<div class="group"><div class="titlebar">Developer Details</div><div class="contentbar">
<label for="appname">Developer Name:</label><input type="text" placeholder="tt" id="developername">
<label for="developerurl">Developer Url:</label><input type="text" placeholder="http://tt.softertool.xyz" id="developerurl">
<label for="publisherid">Publisher Id:</label><input type="text" placeholder="08***2ab-**3a-47**-a4*8-50f4***67e4*" id="publisherid">
<label for="apporigin">App Origin: <small style="color: red">(Don't Change If No Idea)</small></label><input type="text" placeholder="app://ebook.maker" value="app://${aname}.ebook-maker.app" id="apporigin">
<input type="submit" class="submitbtn" id="submit" value="Finish">
</div></div>`;
app.innerHTML = html;
console.log(aicon128);
var developername = document.getElementById('developername');
var developerurl = document.getElementById('developerurl');
var publisherid = document.getElementById('publisherid');
var apporigin = document.getElementById('apporigin');
var submitbtn = document.getElementsByClassName('submitbtn')[0];
developername.addEventListener('keyup', function () {
var patt = /[.,!@#$%^&*():;'"?\/\\=\[\]\+\{\}]/; if (this.value != '' && patt.test(this.value) == false) { this.style = 'background:green;color:white'; dname = this.value; if (developerurl.value != '' && apporigin.value != '') { submitbtn.style.display = 'block'; } }
else { this.style = 'background:red;color: white'; submitbtn.style.display = 'none'; };
});
developerurl.addEventListener('keyup', function () {
var patt = /(http(s?):)\/\/.*/; if (this.value != '' && patt.test(this.value) == true) { this.style = 'background:green;color:white'; durl = this.value; if (developername.value != '' && apporigin.value != '') { submitbtn.style.display = 'block'; } }
else { this.style = 'background:red;color: white'; submitbtn.style.display = 'none'; };
});
publisherid.addEventListener('keyup', function () {
if (this.value != '') { this.style = 'background:green;color:white'; pubid = this.value; if (developername.value != '' && developerurl.value != '' && apporigin.value != '') { submitbtn.style.display = 'block'; } }
else { this.style = 'background:red;color: white'; submitbtn.style.display = 'none'; };
});
apporigin.addEventListener('keyup', function () {
var patt = /(app(s?):)\/\/.*/; if (this.value != '' && patt.test(this.value) == true) { this.style = 'background:green;color:white'; aorigin = this.value; if (developername.value != '' && developerurl.value != '' && publisherid.value != '') { submitbtn.style.display = 'block'; } }
else { this.style = 'background:red;color: white'; submitbtn.style.display = 'none'; };
});
var sel = document.querySelectorAll('input');
for (var i = 0; i < sel.length; i++) {
sel[i].addEventListener('keyup', function (e) {
//var tb = document.activeElement.tabIndex;
if (e.key == 'Enter') {
this.blur();
//document.getElementsByClassName('focusable')[tb+1].focus();
}
});
}
submitbtn.addEventListener('keyup', function () {
var zip = new JSZip();
zip.file('about.html', '<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>About</title><link rel="stylesheet" href="kaios-native-ui.css" /></head><body><div id="app"><div id="header">About</div><div id="content"><p class="list-item__text" style="text-align: center;"><br><u>' + aname + '</u><br><br><br><i>version: ' + aversion + '<br>Developer: ' + dname + '<br></i><br><br><br>© Copyright ' + new Date().getFullYear() + '.</p></div><div class="softkeys"><div class="softkey softkey-left"></div><div class="softkey softkey-center"></div><div class="softkey softkey-right">Back</div></div></div><script>function handleKeydown(e){ switch(e.key){ case \'SoftRight\': history.back(); break; case \'Enter\': window.location.htef=\'help.html\'; break}} document.body.addEventListener(\'keydown\', handleKeydown);</script><script src="https://static.kaiads.com/ads-sdk/ads-sdk.v5.min.js"></script><script src="kaiads.v5.min.js"></script><script>document.addEventListener("DOMContentLoaded", () => { getKaiAd({ publisher: "' + pubid + '", app: "' + aname + '", slot: "' + aname + '", onerror: err => console.error("Custom catch:", err), onready: ad => { ad.call("display"); } }); });</script></body></html>');
zip.file('help.html', '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Help</title><link rel="stylesheet" href="kaios-native-ui.css" /></head><body> <div id="app"><div id="header">Help</div><div id="content"><br><p class="list-item__text" style="font-size: 16px;padding: 5px;text-transform: capitalize;line-height: 25px;">1) press scroll button for scroll<br>2) exit button to exit<br>3) press 2 To scroll slow<br>4) press 8 to Scroll fast<br>5) press 5 to scroll as default</p></div><div class="softkeys"><div class="softkey softkey-left"></div><div class="softkey softkey-center"></div><div class="softkey softkey-right">Back</div></div></div><script>function handleKeydown(e){ switch(e.key){ case \'SoftRight\': history.back(); break;case \'Enter\': window.location.htef=\'about.html\'; break}} document.body.addEventListener(\'keydown\', handleKeydown);</script><script src="https://static.kaiads.com/ads-sdk/ads-sdk.v5.min.js"></script><script src="kaiads.v5.min.js"></script><script>document.addEventListener("DOMContentLoaded", () => { getKaiAd({ publisher: "' + pubid + '", app: "' + aname + '", slot: "' + aname + '", onerror: err => console.error("Custom catch:", err), onready: ad => { ad.call("display"); } }); });</script></body></html>');
zip.file('index.html', '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Index</title><link rel="stylesheet" href="kaios-native-ui.css" /></head><body><div id="app"><div id="header">Ebook</div><div id="content"><div class="list-item-indicator focusable" tabindex="0"><p class="list-item-indicator__text">Open</p><span class="list-item-indicator__indicator"></span></div><div class="list-item focusable" tabindex="1"><p class="list-item__text">Help</p></div><div class="list-item focusable" tabindex="2"><p class="list-item__text">About</p></div><div class="list-item focusable" tabindex="3"><p class="list-item__text">Exit</p></div></div><div class="softkeys"><div class="softkey softkey-left">Link</div><div class="softkey softkey-center">Ok</div><div class="softkey softkey-right">Exit</div></div></div><script src="kaios-native-ui.js"></script><script>function handleKeydown(e){ switch (e.key){ case "ArrowUp": nav(-1); break; case "ArrowDown": nav(1); break; case "ArrowRight": nav(1); break; case "ArrowLeft": nav(-1); break; case "Enter": command(); break; case "SoftLeft": opens(); break; case "SoftRight": exit(); break;}} function nav(move){ var currentIndex=document.activeElement.tabIndex; var next=currentIndex + move; if (next >document.querySelectorAll(".focusable").length-1){ next=0;} else if ( next < 0){ next=document.querySelectorAll(".focusable").length-1;} var items=document.querySelectorAll(".focusable"); var targetElement=items[next]; targetElement.focus();} document.querySelectorAll(".focusable")[0].focus(); document.body.addEventListener("keydown", handleKeydown); function exit(){ var text="Are You Sure ?"; if (confirm(text)==true){ window.close();} else{}} function opens(){ var text="Are You Sure To Open Author Website ?"; if (confirm(text)==true){ window.open("' + durl + '", "_blank");} else{}} function command(){ var c=document.activeElement.tabIndex; switch (c){ case 0: window.location.href="read.html"; break; case 1: window.location.href="help.html"; break; case 2: window.location.href="about.html"; break; case 3: exit(); break;}} </script> <script src="https://static.kaiads.com/ads-sdk/ads-sdk.v5.min.js"></script><script src="kaiads.v5.min.js"></script><script>document.addEventListener("DOMContentLoaded", () => { getKaiAd({ publisher: "' + pubid + '", app: "' + aname + '", slot: "' + aname + '", onerror: err => console.error("Custom catch:", err), onready: ad => { ad.call("display"); } }); });</script></body></html>');
zip.file('read.html', '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Reader</title><link rel="stylesheet" href="kaios-native-ui.css" /></head><body><div id="app"><div id="header">Read</div><div id="content"><p class="list-item__text" style=" font-size: 16px; padding: 5px; line-height: 25px; ">' + nl2br(htmlentityencode(str)) + ' </p></div><div class="softkeys"><div class="softkey softkey-left"></div><div class="softkey softkey-center">Scroll</div><div class="softkey softkey-right">Back</div></div></div><script>time=50; function handleKeydown(e){ switch (e.key){ case "ArrowUp": document.querySelector("#content").scrollBy(0,-20); break; case "ArrowDown": document.querySelector("#content").scrollBy(0,20); break; case "ArrowLeft": document.querySelector("#content").scrollBy(0, (document.querySelector("#content").offsetHeight*-1)-20,{ behavior: "smooth"}); break; case "ArrowRight": document.querySelector("#content").scrollBy(0, (document.querySelector("#content").offsetHeight*1)-20,{ behavior: "smooth"}); console.log(document.querySelector("#content").offsetHeight)-20; break; case "2": time +=10; break; case "8": time -=10; break; case "Enter": pageScroll(); break; case "5": time=100; break; case "SoftRight": history.back(); break;}} function pageScroll(){ document.querySelector("#content").scrollBy(0, 1); scrolldelay=setTimeout(pageScroll, time);} function stopScroll(){ document.querySelector("#content").scrollBy(0, 0); scrolldelay=setTimeout(pageScroll, 0);} document.body.addEventListener("keydown", handleKeydown); </script><script src="https://static.kaiads.com/ads-sdk/ads-sdk.v5.min.js"></script><script src="kaiads.v5.min.js"></script><script>document.body.addEventListener("keyup", () => { getKaiAd({ publisher: "' + pubid + '", app: "' + aname + '", slot: "' + aname + '", onerror: err => console.error("Custom catch:", err), onready: ad => { ad.call("display"); } }); });</script></body></html>');
zip.file('kaiads.v5.min.js', `var a0_0x97c4=['http://127.0.0.1:8081/sdk/ads/ads-sdk.min.js','appendChild','test','addEventListener','catch','length','onerror','push','navigator','mozApps','type','hostname','forEach','endsWith','load','https://static.kaiads.com/ads-sdk/ads-sdk.v5.min.js','http://127.0.0.1/sdk/ads/ads-sdk.min.js','async','result','script','location','apply','then','.localhost','manifest','head','getKaiAd','web','reject','userAgent','dummy','error','src','getSelf','createElement','split'];(function(_0x1ad48b,_0x97c48f){var _0x12a6ec=function(_0x11c212){while(--_0x11c212){_0x1ad48b['push'](_0x1ad48b['shift']());}};_0x12a6ec(++_0x97c48f);}(a0_0x97c4,0xd4));var a0_0x12a6=function(_0x1ad48b,_0x97c48f){_0x1ad48b=_0x1ad48b-0x0;var _0x12a6ec=a0_0x97c4[_0x1ad48b];return _0x12a6ec;};'use strict';(function(){var _0x457a87=this,_0x5d8736=[],_0x5f3d51=function _0x212ebb(_0x493730){_0x5d8736[a0_0x12a6('0x10')](function(_0xb35be3){_0x493730[a0_0x12a6('0x19')](_0x457a87,_0xb35be3);}),_0x5d8736=[];};window[a0_0x12a6('0x1e')]=function(){_0x5d8736[a0_0x12a6('0xb')](arguments);},window[a0_0x12a6('0x1e')][a0_0x12a6('0x22')]=!![];var _0x12380d=function _0x25eaab(_0x3708a3){if(typeof _0x3708a3[a0_0x12a6('0xa')]==='function'){var _0x164442=0x13;_0x3708a3[a0_0x12a6('0xa')](_0x164442);}},_0xeacc58=function _0x6b8586(_0x23bc2b){return new Promise(function(_0x45ea96,_0x5ec98a){var _0x2c2f55=document[a0_0x12a6('0x2')]('script');_0x2c2f55['addEventListener'](a0_0x12a6('0x12'),function(){_0x45ea96();}),_0x2c2f55[a0_0x12a6('0x7')](a0_0x12a6('0x23'),function(){_0x5ec98a();}),_0x2c2f55[a0_0x12a6('0x0')]=_0x23bc2b,_0x2c2f55[a0_0x12a6('0x15')]=![],document['head'][a0_0x12a6('0x5')](_0x2c2f55);});},_0x28b24c=function _0x399e17(_0x4f2810){return new Promise(function(_0x355c79,_0x185516){var _0x132857=document[a0_0x12a6('0x2')](a0_0x12a6('0x17'));_0x132857['addEventListener']('load',function(){!getKaiAd||getKaiAd[a0_0x12a6('0x22')]?_0x185516():_0x355c79();}),_0x132857[a0_0x12a6('0x7')]('error',function(){_0x185516();}),_0x132857['src']=_0x4f2810,document[a0_0x12a6('0x1d')][a0_0x12a6('0x5')](_0x132857);});},_0x598f82;window[a0_0x12a6('0xc')][a0_0x12a6('0xd')]?window['navigator'][a0_0x12a6('0xd')][a0_0x12a6('0x1')]()['onsuccess']=function(_0x4ff815){var _0x580307=_0x4ff815['target'][a0_0x12a6('0x16')];(!_0x580307||!_0x580307['manifest']||!_0x580307[a0_0x12a6('0x1c')][a0_0x12a6('0xe')]||_0x580307[a0_0x12a6('0x1c')][a0_0x12a6('0xe')]===a0_0x12a6('0x1f'))&&(_0x598f82=_0x28b24c('https://static.kaiads.com/ads-sdk/ads-sdk.v5.min.js'));if(!_0x598f82){var _0x3bf9d4=/ kaios\\/((?:\\d+.)*\\d+)/gi['exec'](window[a0_0x12a6('0xc')][a0_0x12a6('0x21')]);_0x3bf9d4&&_0x432c75(_0x3bf9d4[0x1],'2.5')===0x1&&(_0x598f82=_0x28b24c(a0_0x12a6('0x14'))['catch'](function(){return _0x28b24c(a0_0x12a6('0x4'));}));}!_0x598f82&&(_0x598f82=Promise[a0_0x12a6('0x20')]()),_0x598f82[a0_0x12a6('0x8')](function(){_0x5f3d51(_0x12380d),window[a0_0x12a6('0x1e')]=_0x12380d,getKaiAd=_0x12380d;})[a0_0x12a6('0x1a')](function(){_0x5f3d51(getKaiAd),window[a0_0x12a6('0x1e')]=getKaiAd;});}:(/kaios/gi[a0_0x12a6('0x6')](window[a0_0x12a6('0xc')]['userAgent'])&&window[a0_0x12a6('0x18')][a0_0x12a6('0xf')][a0_0x12a6('0x11')](a0_0x12a6('0x1b'))?_0x598f82=_0x28b24c('http://127.0.0.1/sdk/ads/ads-sdk.min.js'):_0x598f82=_0x28b24c(a0_0x12a6('0x13')),!_0x598f82&&(_0x598f82=Promise[a0_0x12a6('0x20')]()),_0x598f82[a0_0x12a6('0x8')](function(){_0x5f3d51(_0x12380d),window['getKaiAd']=_0x12380d,getKaiAd=_0x12380d;})[a0_0x12a6('0x1a')](function(){_0x5f3d51(getKaiAd),window[a0_0x12a6('0x1e')]=getKaiAd;}));function _0x432c75(_0x20ebef,_0x153396){var _0x1a6c74=_0x20ebef[a0_0x12a6('0x3')]('.'),_0x16fcae=_0x153396[a0_0x12a6('0x3')]('.');while(_0x1a6c74[a0_0x12a6('0x9')]<_0x16fcae[a0_0x12a6('0x9')]){_0x1a6c74[a0_0x12a6('0xb')]('0');}while(_0x16fcae[a0_0x12a6('0x9')]<_0x1a6c74[a0_0x12a6('0x9')]){_0x16fcae[a0_0x12a6('0xb')]('0');}for(var _0x482647=0x0;_0x482647<_0x1a6c74[a0_0x12a6('0x9')];++_0x482647){if(_0x1a6c74[_0x482647]==_0x16fcae[_0x482647])continue;else return _0x1a6c74[_0x482647]>_0x16fcae[_0x482647]?0x1:-0x1;}return 0x0;}}());
//# sourceMappingURL=sdk-loader.js.map');`);
zip.file('ads.txt', `#Mediafy
mars.media, 107588, DIRECT, 8624339f102fb076
improvedigital.com, 1210, RESELLER
pubmatic.com, 160194, RESELLER, 5d62403b186f2ace
improvedigital.com, 1662, RESELLER
improvedigital.com, 1221, RESELLER
appnexus.com, 13074, RESELLER, f5ab79cb980f11d1
themediagrid.com, PLTXGE, RESELLER, 35d5010d7789b49d
themediagrid.com, YUPM3V, RESELLER, 35d5010d7789b49d
appnexus.com, 12223, RESELLER, f5ab79cb980f11d1
aol.com, 59025, RESELLER, e1a5b5b6e3255540
yahoo.com, 59025, RESELLER, e1a5b5b6e3255540
improvedigital.com, 1341, RESELLER
smartadserver.com, 4039, RESELLER
conversantmedia.com, 100293, RESELLER, 03113cd04947736d
smaato.com, 1100050531, RESELLER, 07bcf65f187117b4
video.unrulymedia.com, 4270213217, RESELLER
rhythmone.com, 4270213217, RESELLER, a670c89d4a324e47
yieldmo.com, 2888605025750164242, RESELLER
sonobi.com, a7c3746d6a, RESELLER, d1a215d9eb5aee9e
castify.ai, 127588, DIRECT
gitberry.com, 64Q, DIRECT
pubmatic.com, 160195, RESELLER, 5d62403b186f2ace
beachfront.com, 805, RESELLER, e2541279e8e2ca4d
conversantmedia.com, 100343, RESELLER, 03113cd04947736d
mars.media, 107588, DIRECT, 8624339f102fb076
beachfront.com, 805, RESELLER, e2541279e8e2ca4d
improvedigital.com, 1210, RESELLER
improvedigital.com, 1221, RESELLER
improvedigital.com, 1341, RESELLER
appnexus.com, 12223, RESELLER, f5ab79cb980f11d1
pubmatic.com, 160195, RESELLER, 5d62403b186f2ace
pubmatic.com, 160194, RESELLER, 5d62403b186f2ace
gitberry.com, 64Q, DIRECT
improvedigital.com, 1662, RESELLER
castify.ai, 127588, DIRECT
smartadserver.com, 4039, RESELLER
sonobi.com, a7c3746d6a, RESELLER, d1a215d9eb5aee9e
conversantmedia.com, 100293, RESELLER, 03113cd04947736d
appnexus.com, 13074, RESELLER, f5ab79cb980f11d1
aol.com, 59025, RESELLER, e1a5b5b6e3255540
yahoo.com, 59025, RESELLER, e1a5b5b6e3255540
indexexchange.com, 195812, RESELLER, 50b1c356f2c5c8fc
yieldmo.com, 2888605025750164242, RESELLER
themediagrid.com, PLTXGE, RESELLER, 35d5010d7789b49d
themediagrid.com, YUPM3V, RESELLER, 35d5010d7789b49d
video.unrulymedia.com, 4270213217, RESELLER
rhythmone.com, 4270213217, RESELLER, a670c89d4a324e47
smaato.com, 1100050531, RESELLER, 07bcf65f187117b4
conversantmedia.com, 100343, RESELLER, 03113cd04947736d
admixer.net, b6d49994-83c5-4ff9-aa8a-c9eb99d1bc8c, RESELLER
contextweb.com, 558827, DIRECT, 89ff185a4c4e857c
contextweb.com, 562067, DIRECT, 89ff185a4c4e857c
appnexus.com, 12061, RESELLER, f5ab79cb980f11d1
freewheel.tv, 1163473, RESELLER
newborntown.com, 108961, DIRECT
fout.jp, 1151, DIRECT
spotxchange.com, 246977, RESELLER, 7842df1d2fe2db34
spotx.tv, 246977, RESELLER, 7842df1d2fe2db34
tappx.com, 22230, RESELLER, 9f375a07da0318ec
adcolony.com, c490f6e7399a25d6, RESELLER, 1ad675c9de6b5176
appnexus.com, 10824, RESELLER, f5ab79cb980f11d1
appnexus.com, 9569, RESELLER, f5ab79cb980f11d1
chartboost.com, 5da62a1035b91e0aff190bf7, RESELLER
groundtruth.com, 107, RESELLER, 81cbf0a75a5e0e9a
inmobi.com, ec6f6ceb8bb1440ba5455644ec96c275, RESELLER, 83e75a7ae333ca9d
pubmatic.com, 156435, RESELLER, 5d62403b186f2ace
pubmatic.com, 158111, RESELLER, 5d62403b186f2ace
pubmatic.com, 158112, RESELLER, 5d62403b186f2ace
pubmatic.com, 92509, RESELLER, 5d62403b186f2ace
rubiconproject.com, 13856, RESELLER, 0bfd66d529a55807
smartadserver.com, 1692, RESELLER
google.com, pub-8207541904035788, DIRECT, f08c47fec0942fa0
openx.com, 540163881, RESELLER, 6a698e2ec38604c6
mobuppsrtb.com, 0fd7e4f42a8b4b4ef33394d35212b13e, DIRECT
loopme.com, 11185, DIRECT, 6c8d5f95897a5a3b
improvedigital.com, 1785, DIRECT
meitu.com, 433, DIRECT
admatic.com.tr, adm-pub-185375301865, DIRECT
airnow.com, 403001, DIRECT
airnow.com, 404001, DIRECT
onetag.com, 5e0db5c3f1904a6, DIRECT
admixer.net, 81aedb7e-ca73-4498-997c-74f3b92481ea, DIRECT
mobirtb.com, 137, DIRECT
ucfunnel.com, pub-627D23D82BA9DE2EFE344BA8B788D683, DIRECT
aralego.com, pub-627D23D82BA9DE2EFE344BA8B788D683, DIRECT
adiiix.com, pub-627D23D82BA9DE2EFE344BA8B788D683, DIRECT
rtb.gamoshi.io, 267-b850, RESELLER
sovrn.com, 299269, DIRECT, fafdf38b16bf6b2b
lijit.com, 299269, DIRECT, fafdf38b16bf6b2b
onetag.com, 59d216e971852f2, RESELLER
appnexus.com, 3153, RESELLER, f5ab79cb980f11d1
meitu.com, 251, RESELLER
pubmatic.com, 157654, RESELLER, 5d62403b186f2ace
adcolony.com, f858ba060bce51ad, RESELLER, 1ad675c9de6b5176
openx.com, 540899687, RESELLER, 6a698e2ec38604c6
rubiconproject.com, 18224, RESELLER, 0bfd66d529a55807
smartadserver.com, 1894, RESELLER
smartadserver.com, 3445, RESELLER
appnexus.com, 10490, RESELLER, f5ab79cb980f11d1
supply.colossusssp.com, 211, DIRECT, 6c5b49d96ec1b458
admixer.net, 81aedb7e-ca73-4498-997c-74f3b92481ea, RESELLER
aralego.com, par-D232D76A227923DA1D28D94AA9699AE8, RESELLER
ucfunnel.com, par-D232D76A227923DA1D28D94AA9699AE8, RESELLER
cmcm.com, 127, RESELLER
rhythmone.com, 3900035207, RESELLER, a670c89d4a324e47
indexexchange.com, 182257, RESELLER, 50b1c356f2c5c8fc
spotxchange.com, 285547, RESELLER, 7842df1d2fe2db34
spotx.tv, 285547, RESELLER, 7842df1d2fe2db34
video.unrulymedia.com, 3900035207, RESELLER
advangelists.com, 1be3bc32e6564055d5ca3e5a354acbef, DIRECT, 60d26397ec060f98
adform.com, 2600, DIRECT
stroeer.com, 14214, DIRECT
contextweb.com, 558750, DIRECT, 89ff185a4c4e857c
mobuppsrtb.com, c74d97b01eae257e44aa9d5bade97baf4471, RESELLER
improvedigital.com, 1785, RESELLER
indexexchange.com, 192104, DIRECT, 50b1c356f2c5c8fc
improvedigital.com, 912, RESELLER
pubmatic.com, 159078, RESELLER, 5d62403b186f2ace
stroeer.com, 17938, DIRECT
improvedigital.com, 1275, RESELLER
pubmatic.com, 159831, DIRECT, 5d62403b186f2ace
pubmatic.com, 159897, RESELLER, 5d62403b186f2ace
appnexus.com, 8217, RESELLER, f5ab79cb980f11d1
openx.com, 540011801, RESELLER, 6a698e2ec38604c6
loopme.com, 11281, RESELLER, 6c8d5f95897a5a3b
meitu.com, 253, DIRECT
smartyads.com, 1406, DIRECT, fd2bde0ff2e62c5d
smartyads.com, 1373, DIRECT, fd2bde0ff2e62c5d
smartyads.com, 1725, DIRECT, fd2bde0ff2e62c5d
improvedigital.com, 1797, RESELLER
sovrn.com, 289960, RESELLER, fafdf38b16bf6b2b
pubmatic.com, 158651, RESELLER, 5d62403b186f2ace
freewheel.tv, 1073329, RESELLER
freewheel.tv, 1073345, RESELLER
onetag.com, 5e3b68a4a263f95, RESELLER
waardex.com, 112907, DIRECT
epom.com, 9640d532-1239-4845-bb8e-0dc447b7b915, RESELLER, a05085f3142a1ca8
tappx.com, 33376, DIRECT, 9f375a07da0318ec
improvedigital.com, 1678, RESELLER
loopme.com, 11272, RESELLER, 6c8d5f95897a5a3b
rubiconproject.com, 20744, RESELLER, 0bfd66d529a55807
openx.com, 540298543, RESELLER, 6a698e2ec38604c6
pubmatic.com, 158154, RESELLER, 5d62403b186f2ace
engagebdr.com, 80, DIRECT
vyadd.com, 12854, RESELLER
improvedigital.com, 1714, RESELLER
web3.us.com, 63207, DIRECT
mgid.com, 505794, DIRECT, d4c29acad76ce94f
admixer.net, 54355ed6-7634-45fe-b731-5e4e5a8515b9, DIRECT
e-planning.net, ec771b05828a67fa, RESELLER, c1ba615865ed87b2
sovrn.com, 268876, RESELLER, fafdf38b16bf6b2b
lijit.com, 268876, RESELLER, fafdf38b16bf6b2b
openx.com, 541031350, RESELLER, 6a698e2ec38604c6
improvedigital.com, 1556, RESELLER
axonix.com, 56222, RESELLER
contextweb.com, 562309, RESELLER, 89ff185a4c4e857c
conversantmedia.com, 100066, RESELLER, 03113cd04947736d
rubiconproject.com, 12186, RESELLER, 0bfd66d529a55807
onetag.com, 59d216e971852f2, DIRECT
betweendigital.com, 43070, DIRECT
rubiconproject.com, 19724, RESELLER, 0bfd66d529a55807
google.com, pub-5289985627731322, RESELLER, f08c47fec0942fa0
meitu.com, 251, DIRECT
cmcm.com, 127, DIRECT
germaniavid.com, d9d4f495e875a2e075a1a4a6e1b9770f6900, RESELLER
improvedigital.com, 1728, RESELLER
admixer.net, c9ed39e8-724d-4012-ae61-38a5ac81bb0e, DIRECT
betweendigital.com, 43070, RESELLER
streamkey.tv, 3070, RESELLER, f5ab793he40f11d1
telaria.com, j5en0-29eta, RESELLER, 1a4e959a1b50034a
meitu.com, 479, RESELLER
sonobi.com, 2b21773f25, DIRECT, d1a215d9eb5aee9e
rhythmone.com, 1059622079, RESELLER, a670c89d4a324e47
contextweb.com, 560606, RESELLER, 89ff185a4c4e857c
rubiconproject.com, 22982, DIRECT, 0bfd66d529a55807
taboola.com, 1304158, DIRECT, c228e6794e811952
spotx.tv, 71451, RESELLER, 7842df1d2fe2db34
quantumdex.io, EXU5919, RESELLER
ssp.e-volution.ai, AJxF6R108a9M6CaTvK, RESELLER
lunamedia.io, 3b57f8b19b67a806513dec9b47557783, RESELLER, 524ecb396915caaf
themediagrid.com, R28I9J, RESELLER, 35d5010d7789b49d
pubmatic.com, 160493, RESELLER, 5d62403b186f2ace
betweendigital.com, 43092, RESELLER
ssp.logan.ai, AJxF6R2a9M6CaTvK, RESELLER
spotxchange.com, 71451, RESELLER, 7842df1d2fe2db34
advertising.com, 8603, RESELLER
pubmatic.com, 156307, RESELLER, 5d62403b186f2ace
appnexus.com, 3364, RESELLER, f5ab79cb980f11d1
indexexchange.com, 183756, RESELLER, 50b1c356f2c5c8fc
contextweb.com, 560382, RESELLER, 89ff185a4c4e857c
openx.com, 539154393, RESELLER, 6a698e2ec38604c6
tremorhub.com, z87wm, RESELLER, 1a4e959a1b50034a
rubiconproject.com, 16698, RESELLER, 0bfd66d529a55807
freewheel.tv, 799921, RESELLER
rhythmone.com, 1166984029, RESELLER, a670c89d4a324e47
smartadserver.com, 3563, RESELLER
beachfront.com, 13749, RESELLER, e2541279e8e2ca4d
advertising.com, 28458, RESELLER
emxdgt.com, 1643, RESELLER, 1e1d41537f7cad7f
improvedigital.com, 1577, RESELLER
video.unrulymedia.com, 1166984029, RESELLER
video.unrulymedia.com, 2252555169, DIRECT
rhythmone.com, 2252555169, DIRECT, a670c89d4a324e47
gamoshi.io, 267-b4657, DIRECT
gamoshi.io, 267-b4657, RESELLER
sonobi.com, 94997de4e6, DIRECT, d1a215d9eb5aee9e
inmobi.com, 30f3571d1dec45cf80d13b74ed1fffb2, RESELLER, 83e75a7ae333ca9d
kaiads.com, 37907027-6df6-40cd-a683-98a5bb5f3da2, DIRECT
conversantmedia.com, 100264, RESELLER, 03113cd04947736d
adform.com, 2795, RESELLER
admixer.co.kr, 1538, RESELLER
ssp.logan.ai, LG4, RESELLER
betweendigital.com, 43837, RESELLER
outbrain.com, 0052a1ede0a266bb35758ae42f0a6f91db, DIRECT
appnexus.com, 7597, RESELLER, f5ab79cb980f11d1
tremorhub.com, q017o-78mlk, RESELLER, 1a4e959a1b50034a
teads.tv, 15429, RESELLER, 15a9c44f6d26cbe1
advertising.com, 26154, RESELLER
spotxchange.com, 225721, RESELLER
freewheel.tv, 741650, RESELLER
rubiconproject.com, 17130, RESELLER, 0bfd66d529a55807
lkqd.net, 450, RESELLER, 59c49fa9598a0117
openx.com, 540393169, RESELLER, 6a698e2ec38604c6
spotx.tv, 238936, RESELLER, 7842df1d2fe2db34
spotxchange.com, 238936, RESELLER, 7842df1d2fe2db34
advertising.com, 28038, RESELLER
rubiconproject.com, 19668, RESELLER, 0bfd66d529a55807
indexexchange.com, 190856, RESELLER, 50b1c356f2c5c8fc
pubmatic.com, 158615, RESELLER, 5d62403b186f2ace
vidazoo.com, 1773068026, RESELLER, b6ada874b4d7d0b2
lkqd.net, 602, RESELLER, 59c49fa9598a0117
beachfront.com, 14027, RESELLER, e2541279e8e2ca4d
smartadserver.com, 3820, RESELLER
rhythmone.com, 367782854, RESELLER, a670c89d4a324e47
video.unrulymedia.com, 367782854, RESELLER
indexexchange.com, 193091, RESELLER, 50b1c356f2c5c8fc
pubmatic.com, 160065, RESELLER, 5d62403b186f2ace
synacor.com, 82423, RESELLER, e108f11b2cdf7d5b
improvedigital.com, 1863, RESELLER
freewheel.tv, 1220655, RESELLER
smaato.com, 1100048704, RESELLER, 07bcf65f187117b4
vidoomy.com, 61107, RESELLER
contextweb.com, 562145, RESELLER, 89ff185a4c4e857c
mobupps.com, c74d97b01eae257e44aa9d5bade97baf4471, DIRECT
catapultx.com, 141027, DIRECT
e-planning.net,90db94ab9bfec725,DIRECT,c1ba615865ed87b2
betweendigital.com, 43807, DIRECT
supply.colossusssp.com, 285, DIRECT, 6c5b49d96ec1b458
appnexus.com,10490,RESELLER, f5ab79cb980f11d1
contextweb.com,562060,DIRECT, 89ff185a4c4e857c
rhythmone.com,2147483647,RESELLER, a670c89d4a324e47
video.unrulymedia.com,2147483647,RESELLER, a670c89d4a324e47
pubmatic.com,160114,RESELLER, 5d62403b186f2ace
tpmn.io, 505, RESELLER
inmobi.com, ab915bcef5b24940bf745f1a8f427bec, RESELLER, 83e75a7ae333ca9d
rubiconproject.com, 11726, RESELLER, 0bfd66d529a55807
tpmn.io, 504, RESELLER
motionspots.com, 117041, DIRECT, f0220652b4aaebdc
yeahmobi.com,5135235,DIRECT
adsgard.net, 902, DIRECT, 36a1c66e1a2f76dd
opera.com,pub5954318212352,DIRECT,55a0c5fd61378de3
appnexus.com,13227,RESELLER
yahoo.com, 59052, RESELLER
risecodes.com,6022acddc8b2f90001767980, RESELLER
yahoo.com, 59040, RESELLER, e1a5b5b6e3255540
emxdgt.com, 2014, RESELLER, 1e1d41537f7cad7f
pubmatic.com, 161463, RESELLER, 5d62403b186f2ace
germaniavid.com, 433197, RESELLER
vidoomy.com, 8219011, DIRECT
appnexus.com, 12475, RESELLER, f5ab79cb980f11d1
yahoo.com, 56860, RESELLER, e1a5b5b6e3255540
germaniavid.com, 433198, RESELLER
pubmatic.com, 156498, RESELLER, 5d62403b186f2ace
adform.com, 2742, RESELLER
opera.com, pub6794514651328, DIRECT, 55a0c5fd61378de3
conversantmedia.com, 100269, RESELLER, 03113cd04947736d
triplelift.com, 10522, RESELLER, 6c33edb13117fd86
yahoo.com, 58935, RESELLER, e1a5b5b6e3255540
lemmatechnologies.com, 188, RESELLER, 7829010c5bebd1fb
appnexus.com, 13227, RESELLER
kaiads.com, 080b82ab-b33a-4763-a498-50f464567e49, DIRECT`);
zip.file('LICENSE', `
KaiOS SDK Agreement
March 19, 2019
https://www.kaiostech.com/sdk-agreement/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Scope.
This KaiOS SDK Agreement ("Agreement") apply to all developers wishing to
develop applications for the KaiOS. The Agreement forms a valid contract
between you ("you" or "Licensee"), and KAI OS TECHNOLOGIES (HONG KONG) LIMITED,
a corporation duly organized and existing under the laws of Hong Kong,
having its principle place of business at 12/F, 133 Wai Yip Street, Kwun Tong,
Kowloon, Hong Kong, Hong Kong ("we" or "KAI").
Do note that we may change the Agreement from time to time at our discretion.
Whenever the Agreement is modified, we will ask you to accept the new terms
before downloading the KAI software.
You accept these terms by clicking on the applicable "I accept" button (or similar)
shown to you in connection with these Agreement. If you are accepting this
Agreement on behalf of your employer or another organisation, by clicking on
accept you represent and warrant that you are authorized to accept this
Agreement on behalf of that organisation.
Do note that we may change the Agreement from time to time at our discretion.
Whenever the Agreement is modified, we will ask you to accept the new terms
before downloading the KAI software.
You accept these terms by clicking on the applicable "I accept" button (or similar)
shown to you in connection with these Agreement. If you are accepting this
Agreement on behalf of your employer or another organisation, by clicking on
accept you represent and warrant that you are authorized to accept this
Agreement on behalf of that organisation.
2. Definitions.
In this Agreement:
"Application" means one or more software programs developed by Licensee in
compliance with the Documentation and Developer Requirements, under Licensee’s
own trademark or brand, and for specific use with the KaiOS Devices, including
bug fixes, updates, upgrades, modifications, enhancements, supplements to,
revisions, new releases and new versions of such software programs.
"Documentation" means any technical or other specifications or documentation
that KAI may provide to Licensee for use in connection with SDK.
"Documented API(s)" means the application programming interface(s) documented
by KAI in the Documentation and which are contained in SDK.
"FOSS" means any software that is subject to terms that, as a condition of use,
copying, modification or redistribution, require such software and/or derivative
works thereof to be disclosed or distributed in source code form, to be licensed
for the purpose of making derivative works, or to be redistributed free of charge,
including without limitation software distributed under the GNU General Public
License or GNU Lesser/Library GPL, Mozilla Public License (MPL), or Apache License.
"Developer Requirements" mean the technical, human interface, design,
product category, security, performance, and other criteria and requirements
set forth in Exhibit A.
"KaiOS" means the KaiOS mobile operating system owned by KAI.
"KaiOS Devices" means mobile devices that run KaiOS.
"KaiOS Store" means the service portal application KAI has created which allows
registered end users to download services and applications on KaiOS Devices.
"Security Solution" means the proprietary content protection system of KAI
to be applied to Applications distributed on the KaiOS Store to administer
KAI’s standard usage rules for Applications, as such system and rules may be
modified by KAI from time to time.
"SDK" means the Documentation, software (source code and object code),
applications, sample code, simulator, tools, libraries, APIs, data, files,
and materials provided by KAI for use by Licensee in connection with the
Application development, and includes any Updates that may be provided by
KAI to Licensee pursuant to this Agreement.
"Term" means the period described in Section 10.
"Updates" means bug fixes, updates, upgrades, modifications, enhancements,
supplements, and new releases or versions of the SDK, or to any part of SDK.
3. License and Restrictions.
3.1 Permitted Uses and Restrictions.
Subject to the terms and conditions of this Agreement, KAI hereby grants
Licensee a limited, non-exclusive, personal, revocable, non-sublicensable
and non-transferable license, during the Term, to:
(a) install a reasonable number of copies of the SDK for the sole purpose
of developing or testing Applications;
(b) distribute the SDK solely as integrated part of the Application in
accordance with this Agreement, and
(c) use and copy the Documentation for internal use only and for the sole
purpose of developing or testing Applications.
Licensee will be solely responsible for all costs, expenses, losses and
liabilities incurred, and activities undertaken by Licensee in connection
with the foregoing license.
3.2 Copyright Notices.
Licensee agrees to retain the KAI copyright, disclaimers and other proprietary
notices (as they appear in SDK and related services and Documentation provided)
in all copies of SDK and Documentation.
3.3 Ownership.
KAI retains all rights, title, and interest in and to SDK it may make
available to Licensee under this Agreement.
3.4 No Other Permitted Uses.
Except as otherwise set forth in this Agreement, Licensee shall
not (or enable others):
(a) rent, lease, lend, sell, redistribute, or sublicense SDK,
in whole or in part,
(b) use SDK for any purpose not expressly permitted by this Agreement,
(c) install, use or run the SDK on any non-KaiOS Devices,
(d) copy (except as expressly permitted under this Agreement),
decompile, reverse engineer, disassemble, attempt to derive the
source code of, modify, decrypt, or create derivative works of
SDK or any services provided by SDK, or any part thereof (except
as and only to the extent any foregoing restriction is prohibited
by applicable law),
(e) exploit any services provided hereunder in any unauthorized way
whatsoever, including but not limited to, by trespass or burdening
network capacity.
All licenses not expressly granted in this Agreement are reserved and
no other licenses, immunity or rights, express or implied are granted
by KAI, by implication, estoppel, or otherwise.
This Agreement does not grant Licensee any rights to use any trademarks,
logos or service marks belonging to KAI. If Licensee makes reference to
any KAI’s products or technology, Licensee agrees to comply with the
guidelines furnished by KAI as modified by KAI from time to time.
3.5 Updates.
If Updates are made available by KAI, the terms of this Agreement will
govern such Updates.
4. Licensee Obligations.
4.1 General.
Licensee hereby warrants to KAI that all information provided to KAI by
Licensee will be current, true, accurate and complete.
4.2 Use of SDK.
Licensee agrees that:
(a) It will only use SDK for the purposes and in the manner expressly
permitted by this Agreement and in accordance with all applicable
laws and regulations;
(b) It will not use SDK or any services for any unlawful or illegal activity,
nor to develop any Application which would commit or facilitate the
commission of a crime, or other tortious, unlawful or illegal act;
(c) The Application will be developed in compliance with the Documentation
and the Developer Requirements; and
(d) It will not create any Application that would disable, hack or otherwise
interfere with the Security Solution, or any security, digital signing,
digital rights management, verification or authentication mechanisms
in the SDK or KaiOS.
5. Digital Signing of Applications.
All Applications must be signed with an KAI-issued certificate in order to
be installed on KaiOS Devices in accordance with the process set forth
in Exhibit B.
6. Indemnification.
To the extent permitted by law, Licensee agrees to indemnify, defend and
hold harmless KAI, its directors, officers, employees, independent contractors
and agents (each a “KAI Indemnified Party”) from any and all claims, losses,
liabilities, damages, expenses and costs (including without limitation
attorney’s fees and court costs) (collectively “Losses”) incurred by a KAI
Indemnified Party as a result of any claims that the Applications or the
distribution, use or importation of the Applications or metadata violate
or infringe any third party intellectual property or proprietary rights,
data collection or privacy any claims arising out of KAI’s permitted use,
promotion or distribution of the Application(s), related trademarks and
logos, or images and other materials that Licensee provides to KAI.
7. Term and Termination.
7.1 Term.
This Agreement shall become effective when accepted by Licensee and
shall remain in force unless terminated by either party upon one (1)
month written notice, or as set out below.
7.2 Termination.
This Agreement will terminate, effective immediately upon notice from
the non-breaching party, if the other party:
(a) fails to comply with any term of this Agreement;
(b) commences an action for patent infringement against non-breaching party;
(c) becomes insolvent, fails to pay debts when due, dissolves or ceases
to do business, file for bankruptcy; or
(d) engages, or encourage others to engage, in any fraudulent, improper,
unlawful or dishonest act relating to this Agreement, including,
but not limited to, embezzlement, alteration or falsification of
documents, theft, inappropriate use of computer systems, bribery,
or other misrepresentation of facts.
7.3 Effect of Termination.
Upon the termination of this Agreement for any reason, Licensee shall
immediately cease all use of SDK and services and erase and destroy all
copies of SDK, excluding any archival copies maintained in accordance
with Licensee’s standard business practices required to be maintained
by applicable law, rule or regulation.
The provisions which by their nature are intended to survive termination
or expiration of this Agreement shall survive.
8. No Warranty.
SDK and any services are provided “as is” and “as available”, with all
faults and without warranty of any kind, and KAI hereby disclaims all
warranties and conditions with respect to SDK and services, either express,
implied or statutory, fitness for a particular purpose, and noninfringement
of third party rights.
9. Limitation of Liability.
In no event will KAI be liable for any incidental, special, indirect, consequential
or punitive damages whatsoever, including, without limitation, damages for loss
of profits, loss of data, business interruption or any other commercial damages
or losses, arising out of or related to this agreement, however caused,
whether under a theory of contract, warranty, tort (including negligence),
products liability, or otherwise.
10. General Legal Terms.
10.1 Consent to Collection and Use of Data.
Licensee agrees that KAI may collect and use technical and related
information, including but not limited to information about Applications,
computer, system software, other software and peripherals, that is
gathered periodically to facilitate the provision of software updates
and other services to Licensee (if any) related to SDK, and to verify
compliance with the terms of this Agreement. KAI may use this information,
as long as it is in a form that does not personally identify Licensee,
to improve SDK, KAI products or to provide services or technologies to
Licensee and other customers.
10.2 Assignment.
Licensee may not assign or transfer this Agreement by operation of law,
merger, or any other means without KAI’s express prior written consent.
10.3 Relationship of the Parties.
This Agreement will not be construed as creating any other agency
relationship, or a partnership, joint venture, fiduciary duty, or any
other form of legal association between Licensee and KAI.
10.4 Notices.
Any notices relating to this Agreement shall be in writing. Notices
will be deemed given by when sent to the party’s address provided in
connection with this Agreement (e-mail suffices when sending notices
to Licensee).
10.5 Severability.
If a court of competent jurisdiction finds any clause of this Agreement
to be unenforceable for any reason, that clause of this Agreement
shall be enforced to the maximum extent permissible so as to affect
the intent of the parties, and the remainder of this Agreement shall
continue in full force and effect.
10.6 Waiver and Construction.
Failure by a party to enforce any provision of this Agreement shall
not be deemed a waiver of future enforcement of that or any other
provision. Section headings are for convenience only and are not to
be considered in construing or interpreting this Agreement.
10.7 Export Control.
SDK may not be exported or re-exported (a) into any U.S. embargoed
countries or (b) to anyone on the U.S. Treasury Department’s list of
Specially Designated Nationals or the U.S. Department of Commerce
Denied Person’s List or Entity List. By using SDK, Licensee represents
and warrants that Licensee is not located in any such country or on
any such list. Licensee also agree that Licensee will not use SDK for
any purposes prohibited by United States law, including, without limitation,
the development, design, manufacture or production of nuclear, missiles,
or chemical or biological weapons.
10.8 Dispute Resolution; Governing Law.
This Agreement shall be governed by and construed in accordance with
the laws of Hong Kong. In the event that any dispute, claim or controversy
arises between the parties in connection with or relating to this Agreement,
including any question concerning the existence, validity, breach,
termination or interpretation thereof (collectively, “Dispute”), the
aggrieved party shall give the other party a written notice of Dispute
(“Notice of Dispute”) with a description of the Dispute in reasonable detail.
The parties shall negotiate in good faith and exercise reasonable efforts
to settle any notified Dispute within a period of thirty (30) days
following the delivery of the Notice of Dispute. If the parties fail
to resolve the Dispute within such period, the Dispute shall be finally
settled by arbitration by a single arbitrator in accordance with the
UNCITRAL Arbitration Rules (“Rules”) in force when the notice of
arbitration is submitted in accordance with such Rules, as modified by
the HKIAC Procedures for the Administration of International Arbitration.
The place of arbitration shall be in Hong Kong at the HKIAC. The appointing
authority of the arbitrator shall be the HKIAC. The language of the
arbitral proceedings shall be English. The arbitral award shall be final,
binding on the parties and non-appealable to such extent permissible by law.
10.9 Entire Agreement; Governing Language.
This Agreement constitutes the entire agreement between the parties
with respect to SDK licensed hereunder and supersedes all prior understandings
and agreements regarding its subject matter. This Agreement may be modified
only: (a) by a written amendment signed by both parties, or (b) to the
extent expressly permitted by this Agreement. Any translation of this
Agreement is done for local requirements and in the event of a dispute
between the English and any non-English version, the English version of
this Agreement shall govern.
Exhibit A
Application Requirements
1. APIs and Functionality.
(a) Applications may only use Documented APIs in the manner prescribed by KAI
and must not use or call any private APIs.
(b) An Application may not itself install or launch other executable code by
any means, including without limitation through the use of a plug-in architecture,
calling other frameworks, other APIs or otherwise. No interpreted code may
be downloaded or used in an Application except for code that is interpreted
and run by KAI’s Documented APIs and built-in interpreter(s).
(c) Without KAI’s prior written approval, an Application may not provide, unlock
or enable additional features or functionality through distribution mechanisms