downloader / index.html
bigbossmonster's picture
Rename 1index.html to index.html
97b8ca6 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JAVHD Downloader</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
}
.container {
max-width: 800px;
margin: 20px auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
font-size: 24px;
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 10px;
}
input[type="text"] {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 3px;
}
button {
padding: 8px 15px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
p#videoUrl {
font-size: 0px;
}
.thumbnail {
margin-top: 20px;
max-width: 100%;
height: auto;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
.download-link {
margin-top: 20px;
font-size: 18px;
text-align: center;
padding: 8px 15px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
}
.thumbnail img {
max-width: 100%;
height: auto;
border: 3px solid #ddd;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
margin-top: 10px;
}
.logo-container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo-container a {
text-decoration: none; /* Remove default text decoration */
}
.logo-container img {
max-width: 100px; /* Adjust the size as needed */
height: auto;
}
footer {
text-align: center;
}
</style>
</style>
</head>
<body>
<div class="container">
<div class="logo-container">
<a href="index.html">
<img src="logo.png" alt="Ichi Logo">
</a>
<a href="javhd.html">
<img src="https://c6.cdnjhd.com/javhd/assets/images/push-icons/2.jpg" alt="JavHD Logo">
</a>
</div>
<h1>Ichi AV Downloader</h1>
<label for="thumbnailUrl">Enter Thumbnail URL:</label>
<input type="text" id="thumbnailUrl" placeholder="https://c4.cdnjav.com/content-01/thumbs/1-smbd-156-yua-ariga-s-model-156-p/images/940x530/9s.jpg">
<br>
<p></p>
<button id="convertButton">Convert to Ichi AV Video URL</button>
<p id="videoUrl"></p>
<div class="thumbnail" id="thumbnailImage"></div>
<a id="downloadLink" class="download-link" href="#" download style="display: none;">Download Video</a>
<br>
<footer>Developed by Codemaster©2023</footer>
</div>
<script>
document.getElementById("convertButton").addEventListener("click", function () {
var thumbnailUrlInput = document.getElementById("thumbnailUrl");
var videoUrlOutput = document.getElementById("videoUrl");
var thumbnailImage = document.getElementById("thumbnailImage");
var downloadLink = document.getElementById("downloadLink");
var thumbnailUrl = thumbnailUrlInput.value;
// Extract the video ID from the thumbnail URL
var videoIdMatch = thumbnailUrl.match(/\/thumbs\/([^/]+)-p\/images\/[0-9]+x[0-9]+\/[^/]+\.jpg$/);
if (videoIdMatch && videoIdMatch[1]) {
var videoId = videoIdMatch[1];
var videoUrl = `https://c4.cdnjav.com/content-01/contents/${videoId}/videos/${videoId}_sh.mp4`;
videoUrlOutput.textContent = videoUrl;
thumbnailImage.innerHTML = '<img src="' + thumbnailUrl + '" alt="Thumbnail">';
thumbnailImage.style.display = "block";
downloadLink.href = videoUrl;
downloadLink.style.display = "block";
} else {
// Try to match the alternative format
videoIdMatch = thumbnailUrl.match(/\/thumbs\/([^/]+)\/thumbs\/thumb1\/[0-9]+x[0-9]+\/thumb1\.jpg$/);
if (videoIdMatch && videoIdMatch[1]) {
var videoId = videoIdMatch[1];
var videoUrl = `https://c4.cdnjav.com/content-01/contents/${videoId}/videos/${videoId}_sh.mp4`;
videoUrlOutput.textContent = videoUrl;
thumbnailImage.innerHTML = '<img src="' + thumbnailUrl + '" alt="Thumbnail">';
thumbnailImage.style.display = "block";
downloadLink.href = videoUrl;
downloadLink.style.display = "block";
} else {
videoUrlOutput.textContent = "Invalid Thumbnail URL";
thumbnailImage.style.display = "none";
downloadLink.style.display = "none";
}
}
});
</script>
</body>
</html>