-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
171 lines (155 loc) · 6.53 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pinterest Mass Downloader [Just input pinterest url]</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
display: flex;
align-items: center;
justify-content: center;
position: relative; /* Menetapkan posisi relatif untuk konten utama */
background-color: white;
color: black;
}
.background-text {
position: absolute; /* Menetapkan posisi absolut untuk animasi tulisan */
top: 10%; /* Menempatkan tulisan di 10% dari atas */
left: 50%; /* Menempatkan tulisan di tengah secara horizontal */
transform: translateX(-50%); /* Menggeser tulisan ke tengah */
font-size: 3em; /* Ukuran tulisan */
opacity: 0.2; /* Opasitas tulisan */
}
</style>
</head>
<body>
<div class="background-text" id="typing-text"></div>
<div class="container-sm col-sm-8 mt-3">
<div class="mb-3">
<select class="form-select" aria-label="Default select example" id="imageSizeSelect">
<option value="736x" selected>Select size image</option>
<option value="236x">236x</option>
<option value="736x">736x</option>
<option value="originals">Originals</option>
</select>
</div>
<div class="mb-3">
<textarea class="form-control" name="links" id="links"
placeholder="https://id.pinterest.com/pin/848436017329384845/" rows="7"></textarea>
</div>
<div class="mb-3">
<button class="btn btn-primary mb-3" onclick="processLinks()">Bypass URL</button>
<button type="button" class="btn btn-danger mb-3" onclick="resetURL()">Reset URL</button>
</div>
<div class="mb-3 mt-3">
<div class="alert alert-primary" id="result" role="alert">
</div>
</div>
<!-- Button to download all images -->
<div class="row">
<div class="col-12 mb-3 d-flex justify-content-end">
<button class="btn btn-success" onclick="downloadAllImages()">Download All Images</button>
</div>
</div>
</div>
<script>
function processLinks() {
var linksTextArea = document.getElementById('links');
var links = linksTextArea.value.split('\n');
var imageSizeSelect = document.getElementById('imageSizeSelect');
var selectedImageSize = imageSizeSelect.value;
var resultDiv = document.getElementById('result');
resultDiv.innerHTML = '';
links.forEach(function (link) {
link = link.trim();
if (link !== '') {
fetch(link)
.then(response => {
if (!response.ok) {
throw new Error('Failed to fetch');
}
return response.text();
})
.then(data => {
var pattern = new RegExp("https:\/\/i\.pinimg\.com\/" + selectedImageSize + "\/.*?\.jpg");
var matches = data.match(pattern);
if (matches !== null) {
var imageUrl = matches[0];
resultDiv.innerHTML += "<a href='" + imageUrl + "' target=_blank''>" + imageUrl + "</a></p>";
} else {
resultDiv.innerHTML += "<p>String tidak ditemukan pada " + link + "</p>";
}
})
.catch(error => {
resultDiv.innerHTML += "<p>Gagal mengambil konten dari " + link + ". Kemungkinan tautan tidak valid atau terjadi kesalahan lain.</p>";
});
}
});
}
function downloadAllImages() {
var resultLinks = document.querySelectorAll('#result a');
resultLinks.forEach(function (link) {
var imageUrl = link.href;
var fileName = imageUrl.substring(imageUrl.lastIndexOf('/') + 1);
downloadImage(imageUrl, fileName);
});
}
function downloadImage(url, filename) {
fetch(url)
.then(response => response.blob())
.then(blob => {
var url = window.URL.createObjectURL(blob);
var a = document.createElement('a');
a.href = url;
a.download = filename;
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
});
}
function resetURL() {
document.getElementById('links').value = '';
}
</script>
<script>
var textToType = "PINTEREST DWNLADER RIIZE";
var typeDelay = 135;
var eraseDelay = 970;
animateText();
function animateText() {
var textElement = document.getElementById("typing-text");
var currentIndex = 0;
var isTyping = true;
function typeNextCharacter() {
textElement.textContent += textToType[currentIndex];
currentIndex++;
if (currentIndex < textToType.length) {
setTimeout(typeNextCharacter, typeDelay);
} else {
isTyping = false;
setTimeout(eraseText, eraseDelay);
}
}
function eraseText() {
var currentText = textElement.textContent;
textElement.textContent = currentText.slice(0, -1);
if (currentText.length > 0) {
setTimeout(eraseText, typeDelay);
} else {
currentIndex = 0;
isTyping = true;
setTimeout(typeNextCharacter, typeDelay);
}
}
// Memulai animasi dengan mengetikkan teks pertama
typeNextCharacter();
}
</script>
</body>
</html>