-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbot_adfy.js
More file actions
71 lines (55 loc) · 1.69 KB
/
Copy pathbot_adfy.js
File metadata and controls
71 lines (55 loc) · 1.69 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
document.getElementById('shrink_link').value ='www.tarad.com/product/';
console.log(document.getElementById('shrink_link').value)
setTimeout(function(){
document.getElementById('shrink_submit').click();
},500);
var check = true;
var ShortUrl= "";
setTimeout(function(){
console.log(document.getElementById('shrink_link').value)
while(check) {
ShortUrl =getUrlshort();
if(ShortUrl != "") {
check = false;
alert(ShortUrl);
}
}
document.getElementById('shrink_another').click()
console.log(document.getElementById('shrink_link').value)
},6000);
function getUrlshort(){
return document.getElementById('shrink_link').value;
}
var urlApi = "http://gameinw.in.th/api.php";
console.log(parseURLParams(urlApi));
console.log(urlApi);
function parseURLParams(url) {
var queryStart = url.indexOf("?") + 1,
queryEnd = url.indexOf("#") + 1 || url.length + 1,
query = url.slice(queryStart, queryEnd - 1),
pairs = query.replace(/\+/g, " ").split("&"),
parms = {}, i, n, v, nv;
if (query === url || query === "") {
return;
}
for (i = 0; i < pairs.length; i++) {
nv = pairs[i].split("=");
n = decodeURIComponent(nv[0]);
v = decodeURIComponent(nv[1]);
if (!parms.hasOwnProperty(n)) {
parms[n] = [];
}
parms[n].push(nv.length === 2 ? v : null);
}
return parms;
}
//function getdataApi(){
//var urlApi = "http://gameinw.in.th/api.php";
//$.post(urlApi,{'data':'testdata'},function(response){
//console.log(response);
//},'jsonp');
//}
//setTimeout(function(){
//document.getElementById('shrink_link').value ="";
//console.log(document.getElementById('shrink_link').value;
//},1000);