Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Enhanced app data with more realistic content
- const apps = [
- {
- name: "Instagram",
- developer: "Meta",
- rating: 4.5,
- icon: "https://play-lh.googleusercontent.com/VRMWkE5p3CkWhJs6nv-9ZsLAs1QOg5ob1_3qg-rckwYW7yp1fMrYZqnEFpk0IoVP4LM=s48-rw",
- category: "Social",
- downloads: "1B+",
- size: "45MB",
- ageRating: "12+",
- lastUpdated: "September 15, 2023",
- version: "302.0.0.0.0",
- description: "Connect with friends, share photos and videos, message privately, try Instagram Reels, and more.",
- whatsNew: [
- "Bug fixes and performance improvements",
- "New features for Reels",
- "Enhanced messaging experience",
- "Updated UI elements"
- ],
- screenshots: [
- "https://play-lh.googleusercontent.com/h9jWMwqb-h9hjP4THqrJ50eIwPekjv7QPmTpA85gFQ10PjV02CoGAcYLLptqd19Sa1iJ=w2560-h1440-rw",
- "https://play-lh.googleusercontent.com/PBI2hZdQYVcOtQpkGGWxT_UwOKMNy7lFS8H3BKx37qvHHXVROMiHZVxiuF_v5FGVqw=w2560-h1440-rw"
- ],
- features: ["Photo sharing", "Video sharing", "Direct messaging", "Stories", "Reels"],
- reviews: {
- total: 148000000,
- average: 4.5,
- distribution: [70, 20, 5, 3, 2],
- recent: [
- {
- name: "Sarah Johnson",
- avatar: "https://lh3.googleusercontent.com/a/default-user=s40",
- rating: 5,
- date: "October 1, 2023",
- text: "Great app, love the new features! The interface is intuitive and user-friendly.",
- likes: 245,
- verified: true
- },
- {
- name: "Michael Chen",
- avatar: "https://lh3.googleusercontent.com/a/default-user=s40",
- rating: 4,
- date: "September 30, 2023",
- text: "Good app overall, but could use some performance improvements.",
- likes: 122,
- verified: true
- },
- {
- name: "Emily Wilson",
- avatar: "https://lh3.googleusercontent.com/a/default-user=s40",
- rating: 5,
- date: "September 29, 2023",
- text: "The latest update is amazing! The new features make it so much better to use.",
- likes: 89,
- verified: true
- }
- ]
- }
- },
- {
- name: "CapCut",
- developer: "Bytedance",
- rating: 4.7,
- icon: "https://play-lh.googleusercontent.com/MO4jVMbqskWrBD7BDUiKkymLPDMlSFjnEE-JTCigWv6UcoENgAkSKr8bs0IvPs8Twv8",
- category: "Video Players & Editors",
- downloads: "500M+",
- size: "94MB",
- ageRating: "12+",
- lastUpdated: "January 1, 2025",
- version: "9.2.0",
- description: "CapCut is a free all-in-one video editing app that lets you create incredible videos effortlessly.",
- whatsNew: [
- "Added new trendy effects",
- "Improved export speed",
- "Bug fixes and stability improvements"
- ],
- screenshots: [
- "https://play-lh.googleusercontent.com/vKLYSTe8y2IQ9qYRkk9h4jCBf19HarELDRFBEZa9GtD9fhXXBQporQe2z9kSBx9TfK4E=h300-rw",
- "https://play-lh.googleusercontent.com/tYhbP7MFgRa1lvNn3MOeu3wZNFucZOS4Of--sDOgCS7duVmyCYS-iM1XOeV8vpEEL7M=h300-rw"
- ],
- features: ["Advanced video editing", "Filters and effects", "Text and sticker tools", "Music integration"],
- reviews: {
- total: 35000000,
- average: 4.7,
- distribution: [75, 15, 5, 3, 2],
- recent: [
- {
- name: "Alex Morgan",
- avatar: "https://lh3.googleusercontent.com/a/default-user=s40",
- rating: 5,
- date: "January 5, 2025",
- text: "Absolutely love this app for editing my content! Super easy to use.",
- likes: 320,
- verified: true
- },
- {
- name: "Riya Patel",
- avatar: "https://lh3.googleusercontent.com/a/default-user=s40",
- rating: 4,
- date: "January 4, 2025",
- text: "Great app, but the recent update slowed things down a bit.",
- likes: 150,
- verified: true
- }
- ]
- }
- },
- {
- name: "Spotify",
- developer: "Spotify AB",
- rating: 4.5,
- icon: "https://play-lh.googleusercontent.com/7ynvVIRdhJNAngCg_GI7i8TtH8BqkJYmffeUHsG-mJOdzt1XLvGmbsKuc5Q1SInBjDKN=w240-h480-rw",
- category: "Music & Audio",
- downloads: "1B+",
- size: "36MB",
- ageRating: "12+",
- lastUpdated: "January 3, 2025",
- version: "8.9.0",
- description: "Spotify lets you stream millions of songs, podcasts, and playlists on any device.",
- whatsNew: [
- "Improved playback quality",
- "Enhanced playlist customization",
- "Bug fixes and performance updates"
- ],
- screenshots: [
- "https://play-lh.googleusercontent.com/fOaUJKnuMPk02Gl5qu_B6ePw0myxaNJx3QZihKxsaAix5TYKl1NnfmvzZ52nSAc3w8nD=w2560-h1440-rw",
- "https://play-lh.googleusercontent.com/eT7N-DGqCGJI1UGli8jF7BbMM-6K-Rs2Kw0WFMy7VABLTZdo01qoPknKKg5OxGSvKw=w2560-h1440-rw"
- ],
- features: ["Music streaming", "Offline downloads", "Podcast integration", "Personalized recommendations"],
- reviews: {
- total: 82000000,
- average: 4.5,
- distribution: [65, 20, 8, 4, 3],
- recent: [
- {
- name: "John Doe",
- avatar: "https://lh3.googleusercontent.com/a/default-user=s40",
- rating: 5,
- date: "January 4, 2025",
- text: "Spotify is my go-to for all things music! Great quality and selection.",
- likes: 500,
- verified: true
- }
- ]
- }
- },
- {
- name: "Lightroom",
- developer: "Adobe",
- rating: 4.6,
- icon: "https://play-lh.googleusercontent.com/Rl-Cz9SdkVR-OKhXydZq0cVMocSSolBsox3PxIe_I2dy-6wXIc9u4gbZhT3C3MYPwg=w240-h480-rw",
- category: "Photography",
- downloads: "100M+",
- size: "111MB",
- ageRating: "Everyone",
- lastUpdated: "January 2, 2025",
- version: "8.5.0",
- description: "Edit, organize, and share your photos with advanced tools in Adobe Lightroom.",
- whatsNew: [
- "Added AI tools for editing",
- "Improved cloud syncing",
- "Bug fixes and stability updates"
- ],
- screenshots: [
- "https://play-lh.googleusercontent.com/UBPiJvUds4aEeYOJLJXfnupI7zBWY5q0RGwq95ldzzDnl4T9Gf57iWDVwKBm-17_xtIJ=w526-h296-rw",
- "https://play-lh.googleusercontent.com/wJbTX728g8HzSgz1y0zztmwVrb8v9u5fINMGQNpuF18UQe_u12-XcuMYDZxG6accyw=w526-h296-rw"
- ],
- features: ["Professional-grade editing", "Presets for quick edits", "Cloud syncing", "Built-in camera tools"],
- reviews: {
- total: 12000000,
- average: 4.6,
- distribution: [70, 15, 5, 5, 5],
- recent: [
- {
- name: "Sophia Lee",
- avatar: "https://lh3.googleusercontent.com/a/default-user=s40",
- rating: 5,
- date: "January 2, 2025",
- text: "A must-have app for photographers!",
- likes: 100,
- verified: true
- }
- ]
- }
- },
- {
- name: "InShot",
- developer: "InShot Inc.",
- rating: 4.8,
- icon: "https://play-lh.googleusercontent.com/kMTuBBwXZ-zjg_WB-QB4ZfzM4Tv84vJ4iKcrNeUvHDQqImle6XzdRkrQinfrpcBejHs=w240-h480-rw",
- category: "Video Players & Editors",
- downloads: "500M+",
- size: "62MB",
- ageRating: "12+",
- lastUpdated: "January 4, 2025",
- version: "2.3.0",
- description: "InShot is an easy-to-use video and photo editing app for creating amazing content.",
- whatsNew: [
- "New transition effects added",
- "Enhanced photo editing tools",
- "Bug fixes and app optimization"
- ],
- screenshots: [
- "https://play-lh.googleusercontent.com/HYYj4Yo9UnGetakVCMCLblGYWTO7P-BNfaMTkfiphDRLb-eQbKOZhPtmsfCFvzJAvUw=w526-h296-rw",
- "https://play-lh.googleusercontent.com/nDoHwTjdzTqul8SYZqArJLlyDF0HqvZ2QsMd3nVAyCOXJssxKbXSATyQdaOsK_DCNBeD=w526-h296-rw"
- ],
- features: ["Trim and merge videos", "Add music and text", "Filters and effects", "Photo editing tools"],
- reviews: {
- total: 25000000,
- average: 4.8,
- distribution: [78, 15, 4, 2, 1],
- recent: [
- {
- name: "Liam Carter",
- avatar: "https://lh3.googleusercontent.com/a/default-user=s40",
- rating: 5,
- date: "January 4, 2025",
- text: "Best editing app for quick and professional results. Highly recommend it!",
- likes: 420,
- verified: true
- }
- ]
- }
- },
- {
- name: "Netflix",
- developer: "Netflix, Inc.",
- rating: 4.5,
- icon: "https://play-lh.googleusercontent.com/TBRwjS_qfJCSj1m7zZB93FnpJM5fSpMA_wUlFDLxWAb45T9RmwBvQd5cWR5viJJOhkI=w240-h480-rw",
- category: "Entertainment",
- downloads: "1B+",
- size: "52MB",
- ageRating: "12+",
- lastUpdated: "January 2, 2025",
- version: "10.1.0",
- description: "Netflix is a streaming platform for movies, TV shows, and exclusive Netflix Originals.",
- whatsNew: [
- "Enhanced video streaming quality",
- "Bug fixes and UI improvements",
- "Support for new languages"
- ],
- screenshots: [
- "https://play-lh.googleusercontent.com/tJ5qZZ9pmTpN0jz8qFjERFJI3Dr8ojpjXMsRZozGh52thbTqLihO0OWTs5pTLymKg8g=w526-h296-rw",
- "https://play-lh.googleusercontent.com/k94hAvMy3XdY_fb-dsmFnqk8-IhldkNGuKUF1GgI4Com3JtKMP6AjS3YCXLOjAvZvYI=w526-h296-rw"
- ],
- features: ["Exclusive Netflix Originals", "Offline downloads", "Multiple user profiles", "Cross-device streaming"],
- reviews: {
- total: 95000000,
- average: 4.5,
- distribution: [65, 20, 8, 4, 3],
- recent: [
- {
- name: "Emma Taylor",
- avatar: "https://lh3.googleusercontent.com/a/default-user=s40",
- rating: 5,
- date: "January 3, 2025",
- text: "Love the variety of shows and movies. Worth every penny!",
- likes: 310,
- verified: true
- }
- ]
- }
- },
- {
- name: "YouTube",
- developer: "Google LLC",
- rating: 4.4,
- icon: "https://play-lh.googleusercontent.com/6am0i3walYwNLc08QOOhRJttQENNGkhlKajXSERf3JnPVRQczIyxw2w3DxeMRTOSdsY=w240-h480-rw",
- category: "Video Players & Editors",
- downloads: "10B+",
- size: "37MB",
- ageRating: "12+",
- lastUpdated: "January 5, 2025",
- version: "19.02.34",
- description: "YouTube is the ultimate video-sharing platform for entertainment, learning, and more.",
- whatsNew: [
- "Added new Shorts creation tools",
- "Improved comment filtering",
- "Bug fixes and stability improvements"
- ],
- screenshots: [
- "https://play-lh.googleusercontent.com/xCBJ9BRKffRi8orvRzLn-LcMPPc1A8QC383k8NldcIREeoprwffXPgM_m85yD61B1Ng=w526-h296-rw",
- "https://play-lh.googleusercontent.com/vOxdD2u-ys9J0U964Hle8gCzNAAht5-KR_xJcPCb1ukoGo_4ypD2nByU6wu-x8MUEw=w526-h296-rw"
- ],
- features: ["Video sharing", "Live streaming", "Create Shorts", "Subscriptions and playlists"],
- reviews: {
- total: 150000000,
- average: 4.4,
- distribution: [60, 25, 8, 4, 3],
- recent: [
- {
- name: "Oliver Bennett",
- avatar: "https://lh3.googleusercontent.com/a/default-user=s40",
- rating: 5,
- date: "January 5, 2025",
- text: "My favorite app for both entertainment and learning. Never fails!",
- likes: 420,
- verified: true
- }
- ]
- }
- }
- // Add more apps here with similar detailed information
- ];
- // Loading screen
- window.addEventListener('load', () => {
- setTimeout(() => {
- document.querySelector('.loading-screen').classList.add('hidden');
- }, 1500);
- });
- // Search functionality
- const searchInput = document.getElementById('searchInput');
- const searchSuggestions = document.getElementById('searchSuggestions');
- // Listen for input changes
- searchInput.addEventListener('input', (e) => {
- const query = e.target.value.toLowerCase().trim();
- if (query.length > 0) {
- const filteredApps = apps.filter(app =>
- app.name.toLowerCase().includes(query)
- );
- let resultsHTML = '';
- if (filteredApps.length > 0) {
- // App found: Show the matched app first, then three random apps
- const foundApp = filteredApps[0];
- const randomApps = apps
- .filter(app => app.name.toLowerCase() !== foundApp.name.toLowerCase())
- .sort(() => Math.random() - 0.5)
- .slice(0, 3);
- resultsHTML = `
- ${createAppSuggestion(foundApp)}
- ${randomApps.map(app => createAppSuggestion(app)).join('')}
- `;
- } else {
- const fakeApp = {
- name: capitalize(query),
- icon: "https://play-lh.googleusercontent.com/ndNaffPNdPUirYKs3XPr0NwFE_J_t7HAaPZx15JMcQMOkF1cxBCtBNXLUpuVxCDxCOU=w240-h480-rw",
- category: "Tap to search"
- };
- const randomApps = apps
- .sort(() => Math.random() - 0.5)
- .slice(0, 3);
- resultsHTML = `
- ${createAppSuggestion(fakeApp, true)}
- ${randomApps.map(app => createAppSuggestion(app)).join('')}
- `;
- }
- searchSuggestions.innerHTML = resultsHTML;
- searchSuggestions.classList.add('active');
- } else {
- searchSuggestions.innerHTML = '';
- searchSuggestions.classList.remove('active');
- }
- });
- // Handle Enter Key
- searchInput.addEventListener('keypress', (e) => {
- if (e.key === 'Enter') {
- const query = searchInput.value.toLowerCase().trim();
- const filteredApps = apps.filter(app =>
- app.name.toLowerCase().includes(query)
- );
- if (filteredApps.length === 0) {
- // Redirect to LiteAPKs if app not found
- const encodedQuery = encodeURIComponent(query.replace(/\s+/g, '+'));
- window.open(`https://liteapks.com/?s=${encodedQuery}`, '_blank');
- }
- }
- });
- // Helper function to create an app suggestion
- function createAppSuggestion(app, isFake = false) {
- return `
- <div class="suggestion-item" ${isFake ? `onclick="redirectToLiteAPKs('${app.name}')"` : `onclick="showAppDetails('${app.name}')"`}>
- <img src="${app.icon}" alt="${app.name}" style="width: 32px; height: 32px; border-radius: 8px;">
- <div>
- <div>${app.name}</div>
- <div style="color: #5f6368; font-size: 0.9rem;">${app.category}</div>
- </div>
- </div>
- `;
- }
- // Redirect to LiteAPKs page
- function redirectToLiteAPKs(appName) {
- const encodedQuery = encodeURIComponent(appName.replace(/\s+/g, '+'));
- window.open(`https://liteapks.com/?s=${encodedQuery}`, '_blank');
- }
- // Helper function to capitalize the first letter of a string
- function capitalize(str) {
- return str.charAt(0).toUpperCase() + str.slice(1);
- }
- // Close search suggestions when clicking outside
- document.addEventListener('click', (e) => {
- if (!searchInput.contains(e.target) && !searchSuggestions.contains(e.target)) {
- searchSuggestions.classList.remove('active');
- }
- });
- // Category functionality
- const categoryButtons = document.querySelectorAll('.categories button');
- categoryButtons.forEach(button => {
- button.addEventListener('click', () => {
- categoryButtons.forEach(btn => btn.classList.remove('active'));
- button.classList.add('active');
- const category = button.dataset.category;
- filterAppsByCategory(category);
- });
- });
- function filterAppsByCategory(category) {
- const filteredApps = category === 'all' ?
- apps :
- apps.filter(app => app.category.toLowerCase() === category.toLowerCase());
- updateSections(filteredApps);
- }
- // Create carousel item
- function createCarouselItem(app) {
- return `
- <div class="carousel-item" onclick="showAppDetails('${app.name}')">
- <img src="${app.screenshots[0]}" alt="${app.name}">
- </div>
- `;
- }
- // Create app card with enhanced information
- function createAppCard(app) {
- return `
- <div class="app-card" onclick="showAppDetails('${app.name}')">
- <img src="${app.icon}" alt="${app.name}" class="app-icon">
- <div class="app-info">
- <div class="app-name">${app.name}</div>
- <div class="app-developer">${app.developer}</div>
- <div class="app-meta">
- <div class="app-rating">
- <span>${app.rating}</span>
- <span class="material-icons">star</span>
- </div>
- <div class="app-size">${app.size}</div>
- </div>
- </div>
- </div>
- `;
- }
- // Update the showAppDetails function in main.js
- window.showAppDetails = function(appName) {
- const app = apps.find(a => a.name === appName);
- const modal = document.createElement('div');
- modal.className = 'app-modal';
- // Prevent body scrolling when modal is open
- document.body.style.overflow = 'hidden';
- modal.innerHTML = `
- <div class="modal-overlay"></div>
- <div class="modal-container">
- <div class="modal-content">
- <button class="back-btn">
- <span class="material-icons">arrow_back</span>
- </button>
- <div class="app-header">
- <div class="app-basic-info">
- <img src="${app.icon}" alt="${app.name}" class="app-icon">
- <div class="app-text">
- <h2>${app.name}</h2>
- <span class="developer">${app.developer}</span>
- <div class="meta-info">
- <span class="category">${app.category}</span>
- <span class="contains-ads">Contains ads</span>
- </div>
- </div>
- </div>
- <div class="button-group">
- <button class="share-btn">
- <svg width="24" height="24" viewBox="0 0 24 24" class="share-icon"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"></path></svg>
- </button>
- <button class="install-btn">Install</button>
- </div>
- </div>
- <div class="app-stats">
- <div class="stat-item">
- <div class="stat-value">${app.rating}<i class="material-icons star-icon">star</i></div>
- <div class="stat-label">${app.reviews.total.toLocaleString()} reviews</div>
- </div>
- <div class="stat-item">
- <div class="stat-value">${app.downloads}</div>
- <div class="stat-label">Downloads</div>
- </div>
- <div class="stat-item">
- <div class="stat-value"><img src="https://play-lh.googleusercontent.com/yQChfa9XKlaXMIYTk8w8QwChjT8_SH-_2d2SS-kesw0TLQK1nxtw54bDcoZ09freZJgKrtg4f__is-31Vg=w96-h32-rw" alt="Content rating" width="21" height="21"></div>
- <div class="stat-label">Rated for ${app.ageRating}</div>
- </div>
- </div>
- <div class="screenshot-gallery" role="list">
- ${app.screenshots.map((src, index) => `
- <div role="listitem" class="screenshot-item">
- <div class="screenshot-container" jscontroller="RQJprf">
- <img
- src="${src}"
- srcset="${src} 2x"
- alt="Screenshot ${index + 1}"
- class="screenshot-image"
- itemprop="image"
- data-screenshot-index="${index}"
- role="button"
- tabindex="0"
- loading="lazy"
- >
- </div>
- </div>
- `).join('')}
- </div>
- <div class="app-description">
- <h3>About this app</h3>
- <p>${app.description}</p>
- </div>
- <div class="whats-new">
- <h3>What's New</h3>
- <div class="version-info">Version ${app.version} • ${app.lastUpdated}</div>
- <ul>
- ${app.whatsNew.map(update => `<li>${update}</li>`).join('')}
- </ul>
- </div>
- <div class="data-safety">
- <h3>Data Safety</h3>
- <p>Safety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.</p>
- <div class="data-safety-details">
- <div class="data-item">
- <img src="https://play-lh.googleusercontent.com/iFstqoxDElUVv4T3KxkxP3OTcuFvWF5ZQQjT7aIxy4n2uaVigCCykxeG6EZV9FQ10X1itPj1oORm=s20-rw" alt="Data Shared Icon">
- <div>
- <h4>This app may share these data types with third parties</h4>
- <p>Location, Personal info, and 2 others</p>
- </div>
- </div>
- <div class="data-item">
- <img src="https://play-lh.googleusercontent.com/12USW7aflgz466ifDehKTnMoAep_VHxDmKJ6jEBoDZWCSefOC-ThRX14Mqe0r8KF9XCzrpMqJts=s20-rw" alt="Data Collected Icon">
- <div>
- <h4>This app may collect these data types</h4>
- <p>Location, Personal info, and 5 others</p>
- </div>
- </div>
- <div class="data-item">
- <img src="https://play-lh.googleusercontent.com/W5DPtvB8Fhmkn5LbFZki_OHL3ZI1Rdc-AFul19UK4f7np2NMjLE5QquD6H0HAeEJ977u3WH4yaQ=s20-rw" alt="Data Encrypted Icon">
- <div>
- <h4>Data is encrypted in transit</h4>
- </div>
- </div>
- <div class="data-item">
- <img src="https://play-lh.googleusercontent.com/ohRyQRA9rNfhp7xLW0MtW1soD8SEX45Oec7MyH3FaxtukWUG_6GKVpvh3JiugzryLi7Bia02HPw=s20-rw" alt="Data Deletion Icon">
- <div>
- <h4>You can request that data be deleted</h4>
- </div>
- </div>
- <div class="see-details">
- <a href="/store/apps/datasafety?id=com.example.app" target="_blank">See details</a>
- </div>
- </div>
- </div>
- <div class="reviews">
- <h3>Ratings and reviews</h3>
- <div class="ratings-overview">
- <div class="rating-big">
- <span class="rating-number">${app.rating}</span>
- <div class="rating-stars">
- ${Array(5).fill().map((_, i) => `
- <span class="material-icons">${i < Math.floor(app.rating) ? 'star' : 'star_border'}</span>
- `).join('')}
- </div>
- <span class="total-ratings">${app.reviews.total.toLocaleString()} reviews</span>
- </div>
- <div class="rating-bars">
- ${app.reviews.distribution.map((percentage, index) => `
- <div class="rating-bar">
- <span class="stars">${5 - index}</span>
- <div class="bar-container">
- <div class="bar" style="width: ${percentage}%"></div>
- </div>
- <span class="percentage">${percentage}%</span>
- </div>
- `).join('')}
- </div>
- </div>
- <div class="reviews-list">
- ${app.reviews.recent.map((review, index) => `
- <div class="review">
- <img src="${review.avatar}" alt="${review.name}" class="reviewer-avatar">
- <div class="review-content">
- <div class="review-header">
- <span class="reviewer-name">${review.name}</span>
- <div class="review-rating">
- ${Array(5).fill().map((_, i) => `
- <span class="material-icons">${i < review.rating ? 'star' : 'star_border'}</span>
- `).join('')}
- </div>
- </div>
- <span class="review-date">${review.date}</span>
- <p class="review-text">${review.text}</p>
- <button class="like-button">
- <span class="material-icons">thumb_up</span>
- <span>${review.likes}</span>
- </button>
- <div jscontroller="SWD8cc" data-review-id="review-${index}" data-original-thumbs-up-count="${review.likes}">
- <footer class="Anb3we" jsname="GJNbDf" jsaction="sG2nqb:sY4eAb">
- <div class="NC0Ppb">Did you find this helpful?</div>
- <div jsaction="rcuQ6b:BZEmlb;JIbuQc:TmtE8e" jsmodel="b7Ourf" jscontroller="wW2D8b" data-expanded-toggles="true">
- <div class="b6SkTb">
- <div role="button" id="review-${index}::1" class="D3Qfie VfPpkd-ksKsZd-XxIAqe UQI9cd kofMvc EFMXQ"
- jscontroller="fdeHmf" jsaction="click:cOuCgd;" aria-label="Yes" tabindex="0" aria-pressed="false">
- <div class="Gggmbb" aria-hidden="true"></div>
- <div class="kW9Bj" aria-hidden="true">
- <span jsname="o9vyuc" class="c6xzBd jv2yne"></span>
- <span class="ypTNYd" jsname="ODzDMd">Yes</span>
- </div>
- </div>
- <div role="button" id="review-${index}::2" class="D3Qfie VfPpkd-ksKsZd-XxIAqe UQI9cd kofMvc EFMXQ"
- jscontroller="fdeHmf" jsaction="click:cOuCgd;" aria-label="No" tabindex="0" aria-pressed="false">
- <div class="Gggmbb" aria-hidden="true"></div>
- <div class="kW9Bj" aria-hidden="true">
- <span jsname="o9vyuc" class="c6xzBd jv2yne"></span>
- <span class="ypTNYd" jsname="ODzDMd">No</span>
- </div>
- </div>
- </div>
- </div>
- </footer>
- </div>
- </div>
- </div>
- `).join('')}
- </div>
- </div>
- </div>
- </div>
- `;
- // Add event listeners
- modal.querySelector('.modal-overlay').addEventListener('click', () => {
- modal.remove();
- document.body.style.overflow = '';
- });
- modal.querySelector('.back-btn').addEventListener('click', () => {
- modal.remove();
- document.body.style.overflow = '';
- });
- document.body.appendChild(modal);
- document.querySelectorAll('.screenshot-image').forEach(image => {
- image.addEventListener('click', () => {
- const modal = document.createElement('div');
- modal.className = 'fullscreen-modal';
- modal.innerHTML = `
- <div class="modal-overlay"></div>
- <div class="modal-content">
- <img src="${image.src}" alt="${image.alt}" class="fullscreen-image">
- <button class="close-btn">×</button>
- </div>
- `;
- document.body.appendChild(modal);
- modal.querySelector('.close-btn').addEventListener('click', () => modal.remove());
- modal.querySelector('.modal-overlay').addEventListener('click', () => modal.remove());
- });
- });
- // Add event listeners after modal content is created
- modal.querySelector('.share-btn').addEventListener('click', () => {
- navigator.share
- ? navigator.share({
- title: app.name,
- text: `Check out ${app.name} by ${app.developer}`,
- url: window.location.href
- })
- : alert("Sharing is not supported on this browser.");
- });
- }
- // Initialize the app
- function initializeApp() {
- // Featured carousel
- const carousel = document.getElementById('featuredCarousel');
- carousel.innerHTML = apps.map(createCarouselItem).join('');
- // Horizontal scroll sections
- const sections = {
- 'suggestedApps': apps.sort(() => Math.random() - 0.5).slice(0, 10),
- 'topGames': apps.sort((a, b) => b.rating - a.rating).slice(0, 10),
- 'popularApps': apps.sort((a, b) => b.downloads.localeCompare(a.downloads)).slice(0, 10),
- 'editorsChoice': apps.filter(app => app.rating >= 4.5).slice(0, 10)
- };
- Object.entries(sections).forEach(([id, apps]) => {
- const section = document.getElementById(id);
- if (section) {
- section.innerHTML = apps.map(createAppCard).join('');
- }
- });
- // Initialize carousel navigation
- const carouselContent = document.querySelector('.carousel-content');
- document.querySelector('.carousel-nav.prev').addEventListener('click', () => {
- carouselContent.scrollBy({ left: -600, behavior: 'smooth' });
- });
- document.querySelector('.carousel-nav.next').addEventListener('click', () => {
- carouselContent.scrollBy({ left: 600, behavior: 'smooth' });
- });
- }
- // Initialize when DOM is loaded
- document.addEventListener('DOMContentLoaded', initializeApp);
Add Comment
Please, Sign In to add comment