-
Notifications
You must be signed in to change notification settings - Fork 1
/
uyap.js
50 lines (45 loc) · 1.1 KB
/
uyap.js
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
/**
* Created by alper on 14-Jan-19.
*/
var evraks = [];
$('span.file').each(function (key, name) {
evraks.push($(name).attr('evrak_id'));
});
$('div', {id: 'links'}).appendTo('body');
var newevraks = Array.from(new Set(evraks));
newevraks.length;
var last = 0;
var dosyaId = '000000000'; // dosyaId
var test = window.setInterval(function () {
//evraks.forEach(async function(a,key){
a = newevraks[last];
last++;
if (last >= newevraks.length) {
clearInterval(test);
console.log('bitti');
} else {
console.log(last);
var url = 'https://vatandas.uyap.gov.tr/main/jsp/vatandas/download_document.uyap?evrakId=' + a + '&dosyaId=' + dosyaId + '&yargiTuru=1';
var link = document.createElement('a');
link.href = url;
//link.id='link'+key;
document.body.appendChild(link);
link.click();
}
//});
}, 2000);
var link = $('<a>', {
href: url,
text: 'indirlink',
title: 'indirlink'
});
link.appendTo('body .modal-body');
var link = document.createElement('a');
link.href = url;
document.body.appendChild(link);
link.click();
var link = $('<a>', {
href: url,
text: a
});
link.appendTo('body').click();