Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Sproducts - YouTube Video Downloader</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
<style> | |
.gradient-bg { | |
background: linear-gradient(135deg, #6e8efb, #a777e3); | |
} | |
.download-btn { | |
transition: all 0.3s ease; | |
} | |
.download-btn:hover { | |
transform: translateY(-3px); | |
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); | |
} | |
.feature-card:hover { | |
transform: translateY(-5px); | |
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); | |
} | |
.dark-toggle { | |
transition: all 0.3s ease; | |
} | |
.dark-toggle:hover { | |
transform: scale(1.1); | |
} | |
.video-preview { | |
aspect-ratio: 16/9; | |
} | |
</style> | |
</head> | |
<body class="bg-gray-50 dark:bg-gray-900 transition-colors duration-300"> | |
<!-- Header --> | |
<header class="gradient-bg text-white shadow-lg"> | |
<div class="container mx-auto px-4 py-6"> | |
<div class="flex justify-between items-center"> | |
<div class="flex items-center space-x-2"> | |
<i class="fas fa-download text-2xl"></i> | |
<h1 class="text-2xl font-bold">Sproducts</h1> | |
</div> | |
<nav class="hidden md:flex space-x-8"> | |
<a href="#" class="hover:text-gray-200 font-medium">Home</a> | |
<a href="#features" class="hover:text-gray-200 font-medium">Features</a> | |
<a href="#how-it-works" class="hover:text-gray-200 font-medium">How It Works</a> | |
<a href="#faq" class="hover:text-gray-200 font-medium">FAQ</a> | |
</nav> | |
<div class="flex items-center space-x-4"> | |
<button id="darkModeToggle" class="dark-toggle p-2 rounded-full bg-white bg-opacity-20"> | |
<i class="fas fa-moon dark:hidden"></i> | |
<i class="fas fa-sun hidden dark:block text-yellow-300"></i> | |
</button> | |
<button class="bg-white text-purple-700 px-4 py-2 rounded-lg font-semibold hover:bg-gray-100"> | |
Download App | |
</button> | |
</div> | |
<button class="md:hidden text-2xl"> | |
<i class="fas fa-bars"></i> | |
</button> | |
</div> | |
</div> | |
</header> | |
<!-- Hero Section --> | |
<section class="gradient-bg text-white py-16"> | |
<div class="container mx-auto px-4 flex flex-col md:flex-row items-center"> | |
<div class="md:w-1/2 mb-10 md:mb-0"> | |
<h1 class="text-4xl md:text-5xl font-bold mb-6">Download YouTube Videos in Seconds</h1> | |
<p class="text-xl mb-8">Fast, secure, and unlimited downloads from YouTube and 900+ other sites.</p> | |
<div class="bg-white bg-opacity-10 backdrop-blur-sm rounded-xl p-6 mb-8"> | |
<div class="flex"> | |
<input type="text" id="videoUrl" placeholder="Paste YouTube URL here..." | |
class="flex-grow px-4 py-3 rounded-l-lg text-gray-900 focus:outline-none"> | |
<button id="downloadBtn" class="download-btn bg-purple-700 hover:bg-purple-800 px-6 py-3 rounded-r-lg font-semibold"> | |
<i class="fas fa-download mr-2"></i> Download | |
</button> | |
</div> | |
<div id="errorMessage" class="text-red-300 mt-2 hidden"></div> | |
</div> | |
<div class="flex flex-wrap gap-4"> | |
<div class="flex items-center"> | |
<i class="fas fa-check-circle mr-2 text-green-300"></i> | |
<span>No registration</span> | |
</div> | |
<div class="flex items-center"> | |
<i class="fas fa-check-circle mr-2 text-green-300"></i> | |
<span>No watermarks</span> | |
</div> | |
<div class="flex items-center"> | |
<i class="fas fa-check-circle mr-2 text-green-300"></i> | |
<span>Unlimited downloads</span> | |
</div> | |
</div> | |
</div> | |
<div class="md:w-1/2 flex justify-center"> | |
<div class="relative"> | |
<div class="video-preview bg-gray-800 rounded-xl overflow-hidden w-full max-w-lg"> | |
<img src="https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg" alt="Video Preview" class="w-full h-full object-cover"> | |
<div class="absolute inset-0 flex items-center justify-center"> | |
<button class="bg-red-600 hover:bg-red-700 rounded-full p-4"> | |
<i class="fas fa-play text-white text-xl"></i> | |
</button> | |
</div> | |
</div> | |
<div class="absolute -bottom-4 -right-4 bg-white dark:bg-gray-800 p-3 rounded-lg shadow-lg"> | |
<div class="flex items-center"> | |
<i class="fas fa-download text-purple-600 mr-2"></i> | |
<span class="font-semibold text-gray-800 dark:text-white">Downloading...</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- Features Section --> | |
<section id="features" class="py-16 bg-gray-100 dark:bg-gray-800"> | |
<div class="container mx-auto px-4"> | |
<div class="text-center mb-16"> | |
<h2 class="text-3xl font-bold mb-4 dark:text-white">Explore the Features of Our Video Downloader</h2> | |
<p class="text-gray-600 dark:text-gray-300 max-w-2xl mx-auto"> | |
Download your favorite videos from various online websites with ease. | |
</p> | |
</div> | |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> | |
<!-- Feature 1 --> | |
<div class="feature-card bg-white dark:bg-gray-700 p-6 rounded-xl shadow-md transition-transform duration-300"> | |
<div class="flex items-center mb-4"> | |
<div class="bg-purple-100 dark:bg-purple-900 p-3 rounded-lg mr-4"> | |
<i class="fas fa-globe text-purple-600 dark:text-purple-300 text-xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold dark:text-white">Support Multiple Platforms</h3> | |
</div> | |
<p class="text-gray-600 dark:text-gray-300"> | |
Download from over 900 websites including YouTube, Instagram, Vimeo, Facebook, Twitter, and TikTok. | |
</p> | |
</div> | |
<!-- Feature 2 --> | |
<div class="feature-card bg-white dark:bg-gray-700 p-6 rounded-xl shadow-md transition-transform duration-300"> | |
<div class="flex items-center mb-4"> | |
<div class="bg-blue-100 dark:bg-blue-900 p-3 rounded-lg mr-4"> | |
<i class="fas fa-hd text-blue-600 dark:text-blue-300 text-xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold dark:text-white">High-Quality Downloads</h3> | |
</div> | |
<p class="text-gray-600 dark:text-gray-300"> | |
Up to 8K resolution supported. Available in 8K, 4K, UHD, 1080p, 720p, and more. | |
</p> | |
</div> | |
<!-- Feature 3 --> | |
<div class="feature-card bg-white dark:bg-gray-700 p-6 rounded-xl shadow-md transition-transform duration-300"> | |
<div class="flex items-center mb-4"> | |
<div class="bg-green-100 dark:bg-green-900 p-3 rounded-lg mr-4"> | |
<i class="fas fa-cog text-green-600 dark:text-green-300 text-xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold dark:text-white">Manage and Download Content</h3> | |
</div> | |
<p class="text-gray-600 dark:text-gray-300"> | |
Download private videos and playlists. Convert to multiple output formats: MP4, MP3, MOV, AVI, and more. | |
</p> | |
</div> | |
<!-- Feature 4 --> | |
<div class="feature-card bg-white dark:bg-gray-700 p-6 rounded-xl shadow-md transition-transform duration-300"> | |
<div class="flex items-center mb-4"> | |
<div class="bg-yellow-100 dark:bg-yellow-900 p-3 rounded-lg mr-4"> | |
<i class="fas fa-film text-yellow-600 dark:text-yellow-300 text-xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold dark:text-white">GIF Conversion</h3> | |
</div> | |
<p class="text-gray-600 dark:text-gray-300"> | |
Save portions of online videos as GIFs. Share on platforms like Discord, Twitter, Reddit, and more. | |
</p> | |
</div> | |
<!-- Feature 5 --> | |
<div class="feature-card bg-white dark:bg-gray-700 p-6 rounded-xl shadow-md transition-transform duration-300"> | |
<div class="flex items-center mb-4"> | |
<div class="bg-red-100 dark:bg-red-900 p-3 rounded-lg mr-4"> | |
<i class="fas fa-bolt text-red-600 dark:text-red-300 text-xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold dark:text-white">Efficient Downloading</h3> | |
</div> | |
<p class="text-gray-600 dark:text-gray-300"> | |
One-Click Mode, Cross-platform support, in-built video trimmer, convert videos to audio, and more. | |
</p> | |
</div> | |
<!-- Feature 6 --> | |
<div class="feature-card bg-white dark:bg-gray-700 p-6 rounded-xl shadow-md transition-transform duration-300"> | |
<div class="flex items-center mb-4"> | |
<div class="bg-indigo-100 dark:bg-indigo-900 p-3 rounded-lg mr-4"> | |
<i class="fas fa-shield-alt text-indigo-600 dark:text-indigo-300 text-xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold dark:text-white">Safety and Security</h3> | |
</div> | |
<p class="text-gray-600 dark:text-gray-300"> | |
100% safe and ad-free. 100% secure without bundled installers. Enjoy a seamless downloading experience. | |
</p> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- How It Works Section --> | |
<section id="how-it-works" class="py-16 bg-white dark:bg-gray-900"> | |
<div class="container mx-auto px-4"> | |
<div class="text-center mb-16"> | |
<h2 class="text-3xl font-bold mb-4 dark:text-white">How It Works</h2> | |
<p class="text-gray-600 dark:text-gray-300 max-w-2xl mx-auto"> | |
Downloading videos has never been easier. Just follow these simple steps. | |
</p> | |
</div> | |
<div class="flex flex-col md:flex-row justify-between items-center space-y-8 md:space-y-0"> | |
<!-- Step 1 --> | |
<div class="flex flex-col items-center text-center max-w-xs"> | |
<div class="bg-purple-100 dark:bg-purple-900 w-16 h-16 rounded-full flex items-center justify-center mb-4"> | |
<span class="text-purple-600 dark:text-purple-300 font-bold text-xl">1</span> | |
</div> | |
<h3 class="text-xl font-semibold mb-2 dark:text-white">Paste URL</h3> | |
<p class="text-gray-600 dark:text-gray-300"> | |
Copy and paste the YouTube or other supported platform URL into the box above. | |
</p> | |
</div> | |
<!-- Arrow --> | |
<div class="hidden md:block"> | |
<i class="fas fa-arrow-right text-3xl text-gray-400 dark:text-gray-500"></i> | |
</div> | |
<!-- Step 2 --> | |
<div class="flex flex-col items-center text-center max-w-xs"> | |
<div class="bg-blue-100 dark:bg-blue-900 w-16 h-16 rounded-full flex items-center justify-center mb-4"> | |
<span class="text-blue-600 dark:text-blue-300 font-bold text-xl">2</span> | |
</div> | |
<h3 class="text-xl font-semibold mb-2 dark:text-white">Choose Format</h3> | |
<p class="text-gray-600 dark:text-gray-300"> | |
Select your preferred format (MP4, MP3, etc.) and quality (HD, 4K, etc.). | |
</p> | |
</div> | |
<!-- Arrow --> | |
<div class="hidden md:block"> | |
<i class="fas fa-arrow-right text-3xl text-gray-400 dark:text-gray-500"></i> | |
</div> | |
<!-- Step 3 --> | |
<div class="flex flex-col items-center text-center max-w-xs"> | |
<div class="bg-green-100 dark:bg-green-900 w-16 h-16 rounded-full flex items-center justify-center mb-4"> | |
<span class="text-green-600 dark:text-green-300 font-bold text-xl">3</span> | |
</div> | |
<h3 class="text-xl font-semibold mb-2 dark:text-white">Download</h3> | |
<p class="text-gray-600 dark:text-gray-300"> | |
Click the download button and your file will be ready in seconds. | |
</p> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- FAQ Section --> | |
<section id="faq" class="py-16 bg-gray-100 dark:bg-gray-800"> | |
<div class="container mx-auto px-4"> | |
<div class="text-center mb-16"> | |
<h2 class="text-3xl font-bold mb-4 dark:text-white">Frequently Asked Questions</h2> | |
<p class="text-gray-600 dark:text-gray-300 max-w-2xl mx-auto"> | |
Have questions? We've got answers. If you can't find what you're looking for, contact us. | |
</p> | |
</div> | |
<div class="max-w-3xl mx-auto"> | |
<!-- FAQ Item 1 --> | |
<div class="mb-6"> | |
<button class="faq-toggle flex justify-between items-center w-full p-4 bg-white dark:bg-gray-700 rounded-lg shadow-md text-left"> | |
<span class="font-semibold dark:text-white">Is Sproducts free to use?</span> | |
<i class="fas fa-chevron-down transition-transform duration-300"></i> | |
</button> | |
<div class="faq-content hidden mt-2 p-4 bg-white bg-opacity-70 dark:bg-gray-600 rounded-lg"> | |
<p class="text-gray-700 dark:text-gray-200"> | |
Yes! Sproducts is completely free to use with no hidden charges. You can download as many videos as you want without any limitations. | |
</p> | |
</div> | |
</div> | |
<!-- FAQ Item 2 --> | |
<div class="mb-6"> | |
<button class="faq-toggle flex justify-between items-center w-full p-4 bg-white dark:bg-gray-700 rounded-lg shadow-md text-left"> | |
<span class="font-semibold dark:text-white">What video quality can I download?</span> | |
<i class="fas fa-chevron-down transition-transform duration-300"></i> | |
</button> | |
<div class="faq-content hidden mt-2 p-4 bg-white bg-opacity-70 dark:bg-gray-600 rounded-lg"> | |
<p class="text-gray-700 dark:text-gray-200"> | |
Sproducts supports downloading videos in all available qualities including 8K, 4K, UHD, 1080p, 720p, 480p, and 360p. The available options depend on what the original video provides. | |
</p> | |
</div> | |
</div> | |
<!-- FAQ Item 3 --> | |
<div class="mb-6"> | |
<button class="faq-toggle flex justify-between items-center w-full p-4 bg-white dark:bg-gray-700 rounded-lg shadow-md text-left"> | |
<span class="font-semibold dark:text-white">Can I download private videos?</span> | |
<i class="fas fa-chevron-down transition-transform duration-300"></i> | |
</button> | |
<div class="faq-content hidden mt-2 p-4 bg-white bg-opacity-70 dark:bg-gray-600 rounded-lg"> | |
<p class="text-gray-700 dark:text-gray-200"> | |
Yes, if you have access to view the private video (you're logged in to the account that has permission), you can download it using Sproducts. | |
</p> | |
</div> | |
</div> | |
<!-- FAQ Item 4 --> | |
<div class="mb-6"> | |
<button class="faq-toggle flex justify-between items-center w-full p-4 bg-white dark:bg-gray-700 rounded-lg shadow-md text-left"> | |
<span class="font-semibold dark:text-white">Is it legal to download YouTube videos?</span> | |
<i class="fas fa-chevron-down transition-transform duration-300"></i> | |
</button> | |
<div class="faq-content hidden mt-2 p-4 bg-white bg-opacity-70 dark:bg-gray-600 rounded-lg"> | |
<p class="text-gray-700 dark:text-gray-200"> | |
The legality of downloading YouTube videos depends on your purpose and jurisdiction. Downloading videos for personal use is generally acceptable, but redistributing copyrighted content without permission may violate copyright laws. Always respect copyright and terms of service. | |
</p> | |
</div> | |
</div> | |
<!-- FAQ Item 5 --> | |
<div class="mb-6"> | |
<button class="faq-toggle flex justify-between items-center w-full p-4 bg-white dark:bg-gray-700 rounded-lg shadow-md text-left"> | |
<span class="font-semibold dark:text-white">Can I download entire playlists or channels?</span> | |
<i class="fas fa-chevron-down transition-transform duration-300"></i> | |
</button> | |
<div class="faq-content hidden mt-2 p-4 bg-white bg-opacity-70 dark:bg-gray-600 rounded-lg"> | |
<p class="text-gray-700 dark:text-gray-200"> | |
Yes! With our desktop application, you can download entire playlists or channels with just one click. The web version supports downloading individual videos from playlists. | |
</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- Download Options Modal --> | |
<div id="downloadModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> | |
<div class="bg-white dark:bg-gray-800 rounded-xl p-6 w-full max-w-2xl mx-4"> | |
<div class="flex justify-between items-center mb-6"> | |
<h3 class="text-xl font-bold dark:text-white">Download Options</h3> | |
<button id="closeModal" class="text-gray-500 hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-100"> | |
<i class="fas fa-times text-2xl"></i> | |
</button> | |
</div> | |
<div class="mb-6"> | |
<div class="flex items-center mb-4"> | |
<img src="https://i.ytimg.com/vi/dQw4w9WgXcQ/default.jpg" alt="Video thumbnail" class="w-16 h-12 rounded mr-4"> | |
<div> | |
<h4 class="font-semibold dark:text-white">Never Gonna Give You Up</h4> | |
<p class="text-sm text-gray-500 dark:text-gray-400">Rick Astley • 3:33</p> | |
</div> | |
</div> | |
</div> | |
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6"> | |
<!-- Video Formats --> | |
<div> | |
<h4 class="font-semibold mb-3 dark:text-white">Video Formats</h4> | |
<div class="space-y-2"> | |
<div class="flex items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700"> | |
<input type="radio" name="format" id="format1" class="mr-3" checked> | |
<label for="format1" class="flex-grow dark:text-white"> | |
<span>MP4 - 1080p</span> | |
<span class="block text-sm text-gray-500 dark:text-gray-400">1920x1080 • 60fps</span> | |
</label> | |
<span class="text-sm text-gray-500 dark:text-gray-400">125MB</span> | |
</div> | |
<div class="flex items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700"> | |
<input type="radio" name="format" id="format2" class="mr-3"> | |
<label for="format2" class="flex-grow dark:text-white"> | |
<span>MP4 - 720p</span> | |
<span class="block text-sm text-gray-500 dark:text-gray-400">1280x720 • 30fps</span> | |
</label> | |
<span class="text-sm text-gray-500 dark:text-gray-400">75MB</span> | |
</div> | |
<div class="flex items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700"> | |
<input type="radio" name="format" id="format3" class="mr-3"> | |
<label for="format3" class="flex-grow dark:text-white"> | |
<span>MP4 - 480p</span> | |
<span class="block text-sm text-gray-500 dark:text-gray-400">854x480 • 30fps</span> | |
</label> | |
<span class="text-sm text-gray-500 dark:text-gray-400">45MB</span> | |
</div> | |
</div> | |
</div> | |
<!-- Audio Formats --> | |
<div> | |
<h4 class="font-semibold mb-3 dark:text-white">Audio Formats</h4> | |
<div class="space-y-2"> | |
<div class="flex items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700"> | |
<input type="radio" name="format" id="format4" class="mr-3"> | |
<label for="format4" class="flex-grow dark:text-white"> | |
<span>MP3 - 320kbps</span> | |
<span class="block text-sm text-gray-500 dark:text-gray-400">High Quality</span> | |
</label> | |
<span class="text-sm text-gray-500 dark:text-gray-400">8.2MB</span> | |
</div> | |
<div class="flex items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700"> | |
<input type="radio" name="format" id="format5" class="mr-3"> | |
<label for="format5" class="flex-grow dark:text-white"> | |
<span>MP3 - 192kbps</span> | |
<span class="block text-sm text-gray-500 dark:text-gray-400">Medium Quality</span> | |
</label> | |
<span class="text-sm text-gray-500 dark:text-gray-400">5.1MB</span> | |
</div> | |
<div class="flex items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700"> | |
<input type="radio" name="format" id="format6" class="mr-3"> | |
<label for="format6" class="flex-grow dark:text-white"> | |
<span>MP3 - 128kbps</span> | |
<span class="block text-sm text-gray-500 dark:text-gray-400">Standard Quality</span> | |
</label> | |
<span class="text-sm text-gray-500 dark:text-gray-400">3.4MB</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="flex justify-end"> | |
<button id="confirmDownload" class="download-btn bg-purple-600 hover:bg-purple-700 text-white px-6 py-2 rounded-lg font-semibold"> | |
<i class="fas fa-download mr-2"></i> Download Now | |
</button> | |
</div> | |
</div> | |
</div> | |
<!-- Footer --> | |
<footer class="bg-gray-800 text-white py-12"> | |
<div class="container mx-auto px-4"> | |
<div class="grid grid-cols-1 md:grid-cols-4 gap-8"> | |
<div> | |
<div class="flex items-center mb-4"> | |
<i class="fas fa-download text-2xl mr-2"></i> | |
<h3 class="text-xl font-bold">Sproducts</h3> | |
</div> | |
<p class="text-gray-400"> | |
The fastest and most secure way to download videos from YouTube and other platforms. | |
</p> | |
</div> | |
<div> | |
<h4 class="text-lg font-semibold mb-4">Quick Links</h4> | |
<ul class="space-y-2"> | |
<li><a href="#" class="text-gray-400 hover:text-white">Home</a></li> | |
<li><a href="#features" class="text-gray-400 hover:text-white">Features</a></li> | |
<li><a href="#how-it-works" class="text-gray-400 hover:text-white">How It Works</a></li> | |
<li><a href="#faq" class="text-gray-400 hover:text-white">FAQ</a></li> | |
</ul> | |
</div> | |
<div> | |
<h4 class="text-lg font-semibold mb-4">Legal</h4> | |
<ul class="space-y-2"> | |
<li><a href="#" class="text-gray-400 hover:text-white">Terms of Service</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white">Privacy Policy</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white">Cookie Policy</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white">DMCA</a></li> | |
</ul> | |
</div> | |
<div> | |
<h4 class="text-lg font-semibold mb-4">Connect With Us</h4> | |
<div class="flex space-x-4 mb-4"> | |
<a href="#" class="text-gray-400 hover:text-white text-xl"><i class="fab fa-facebook"></i></a> | |
<a href="#" class="text-gray-400 hover:text-white text-xl"><i class="fab fa-twitter"></i></a> | |
<a href="#" class="text-gray-400 hover:text-white text-xl"><i class="fab fa-instagram"></i></a> | |
<a href="#" class="text-gray-400 hover:text-white text-xl"><i class="fab fa-youtube"></i></a> | |
</div> | |
<p class="text-gray-400"> | |
[email protected]<br> | |
+1 (555) 123-4567 | |
</p> | |
</div> | |
</div> | |
<div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400"> | |
<p>© 2023 Sproducts. All rights reserved.</p> | |
</div> | |
</div> | |
</footer> | |
<script> | |
// Dark Mode Toggle | |
const darkModeToggle = document.getElementById('darkModeToggle'); | |
const html = document.documentElement; | |
// Check for saved user preference or use system preference | |
if (localStorage.getItem('darkMode') === 'true' || | |
(!localStorage.getItem('darkMode') && window.matchMedia('(prefers-color-scheme: dark)').matches)) { | |
html.classList.add('dark'); | |
} | |
darkModeToggle.addEventListener('click', () => { | |
html.classList.toggle('dark'); | |
localStorage.setItem('darkMode', html.classList.contains('dark')); | |
}); | |
// FAQ Toggle | |
const faqToggles = document.querySelectorAll('.faq-toggle'); | |
faqToggles.forEach(toggle => { | |
toggle.addEventListener('click', () => { | |
const content = toggle.nextElementSibling; | |
const icon = toggle.querySelector('i'); | |
content.classList.toggle('hidden'); | |
icon.classList.toggle('rotate-180'); | |
}); | |
}); | |
// Download Modal | |
const downloadBtn = document.getElementById('downloadBtn'); | |
const closeModal = document.getElementById('closeModal'); | |
const downloadModal = document.getElementById('downloadModal'); | |
const videoUrl = document.getElementById('videoUrl'); | |
const errorMessage = document.getElementById('errorMessage'); | |
const confirmDownload = document.getElementById('confirmDownload'); | |
downloadBtn.addEventListener('click', () => { | |
const url = videoUrl.value.trim(); | |
// Simple URL validation | |
if (!url) { | |
errorMessage.textContent = 'Please enter a video URL'; | |
errorMessage.classList.remove('hidden'); | |
return; | |
} | |
if (!url.includes('youtube.com') && !url.includes('youtu.be')) { | |
errorMessage.textContent = 'Please enter a valid YouTube URL'; | |
errorMessage.classList.remove('hidden'); | |
return; | |
} | |
errorMessage.classList.add('hidden'); | |
downloadModal.classList.remove('hidden'); | |
}); | |
closeModal.addEventListener('click', () => { | |
downloadModal.classList.add('hidden'); | |
}); | |
confirmDownload.addEventListener('click', () => { | |
// In a real app, this would trigger the actual download | |
alert('Download started! This is a demo. In a real app, the download would begin now.'); | |
downloadModal.classList.add('hidden'); | |
}); | |
// Close modal when clicking outside | |
downloadModal.addEventListener('click', (e) => { | |
if (e.target === downloadModal) { | |
downloadModal.classList.add('hidden'); | |
} | |
}); | |
// Smooth scrolling for anchor links | |
document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
anchor.addEventListener('click', function(e) { | |
e.preventDefault(); | |
const targetId = this.getAttribute('href'); | |
if (targetId === '#') return; | |
const targetElement = document.querySelector(targetId); | |
if (targetElement) { | |
targetElement.scrollIntoView({ | |
behavior: 'smooth' | |
}); | |
} | |
}); | |
}); | |
</script> | |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=sproducts/yt-downloader" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
</html> |