-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathh2s-easy-filter.html
64 lines (56 loc) · 1.78 KB
/
h2s-easy-filter.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Holland2Stay easy filters</title>
</head>
<body>
<button onclick="openall()">open all</button>
<script>
function openall() {
const links = document.querySelectorAll('a');
console.log('iinks', links);
links.forEach((link) => {
window.open(link.href, '_blank');
});
}
const availability = [
'&available_to_book%5Bfilter%5D=Available+in+lottery%2C336',
];
const city = [
'&city%5Bfilter%5D=Amsterdam%2C24',
'&city%5Bfilter%5D=Haarlem%2C616',
'&city%5Bfilter%5D=Utrecht%2C27',
];
const numberOfRooms = [
'&no_of_rooms%5Bfilter%5D=Studio%2C104',
'&no_of_rooms%5Bfilter%5D=1%2C105',
'&no_of_rooms%5Bfilter%5D=2%2C106',
];
const baseUrl = 'https://holland2stay.com/residences?page=1';
const allVariations = [];
for (let i = 0; i < availability.length; i++) {
for (let j = 0; j < city.length; j++) {
for (let k = 0; k < numberOfRooms.length; k++) {
allVariations.push(
baseUrl + availability[i] + city[j] + numberOfRooms[k]
);
}
}
}
allVariations.forEach((variation) => {
const a = document.createElement('a');
a.style.fontSize = '20px';
a.style.margin = '5px';
a.style.display = 'block';
a.href = variation;
a.innerText = variation;
document.body.appendChild(a);
document.body.appendChild(document.createElement('br'));
a.target = '_blank';
});
document.querySelector('a').focus();
</script>
</body>
</html>