Spaces:
Paused

Download / adults.html
LiveSportmm's picture
Rename adults (1).html to adults.html
e87ac2f verified
Raw History Blame Contribute Delete
36.3 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My APK Browser</title>
<!-- Material Icons -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: #f5f5f5;
height: 100vh;
display: flex;
flex-direction: column;
}
/* Browser Header */
.browser-header {
background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
color: white;
padding: 12px 16px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
position: relative;
z-index: 1000;
}
.header-top {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.browser-controls {
display: flex;
align-items: center;
gap: 15px;
}
.control-btn {
background: rgba(255, 255, 255, 0.2);
border: none;
color: white;
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s;
}
.control-btn:hover {
background: rgba(255, 255, 255, 0.3);
transform: scale(1.1);
}
.control-btn:active {
transform: scale(0.95);
}
.browser-title {
font-size: 16px;
font-weight: 500;
text-align: center;
flex: 1;
margin: 0 20px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Address Bar */
.address-bar-container {
background: white;
border-radius: 24px;
padding: 8px 16px;
display: flex;
align-items: center;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-top: 5px;
}
.security-indicator {
color: #0d47a1;
margin-right: 10px;
}
.address-input {
flex: 1;
border: none;
outline: none;
font-size: 14px;
padding: 8px;
color: #333;
background: transparent;
}
.address-input::placeholder {
color: #666;
}
.refresh-btn {
background: none;
border: none;
color: #5f6368;
cursor: pointer;
padding: 4px;
border-radius: 50%;
transition: background 0.2s;
}
.refresh-btn:hover {
background: #f1f3f4;
}
/* Browser Content Area */
.browser-content {
flex: 1;
position: relative;
overflow: hidden;
}
/* Tab System */
.tab-system {
display: flex;
background: #e8eaed;
padding: 8px 8px 0 8px;
overflow-x: auto;
}
.tab {
background: white;
padding: 10px 20px;
border-radius: 8px 8px 0 0;
margin-right: 2px;
display: flex;
align-items: center;
min-width: 120px;
max-width: 200px;
cursor: pointer;
position: relative;
border: 1px solid #dadce0;
border-bottom: none;
}
.tab.active {
background: white;
z-index: 2;
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}
.tab-favicon {
width: 16px;
height: 16px;
margin-right: 8px;
background: #1a73e8;
border-radius: 50%;
}
.tab-title {
flex: 1;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #3c4043;
}
.tab-close {
margin-left: 8px;
color: #5f6368;
opacity: 0;
transition: opacity 0.2s;
cursor: pointer;
}
.tab:hover .tab-close {
opacity: 1;
}
.new-tab-btn {
background: #1a73e8;
color: white;
border: none;
width: 36px;
height: 36px;
border-radius: 50%;
margin-left: 8px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
/* Iframe Container */
.iframe-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: white;
display: none;
}
.iframe-container.active {
display: block;
}
.browser-iframe {
width: 100%;
height: 100%;
border: none;
background: white;
}
/* Loading Overlay */
.loading-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.9);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 1001;
display: none;
}
.loading-overlay.active {
display: flex;
}
.spinner {
width: 50px;
height: 50px;
border: 4px solid #f3f3f3;
border-top: 4px solid #1a73e8;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Home Page Content */
.home-content {
padding: 40px 20px;
text-align: center;
background: white;
height: 100%;
overflow-y: auto;
}
.home-content h1 {
color: #1a73e8;
margin-bottom: 20px;
font-size: 2.5rem;
}
.home-content p {
color: #666;
margin-bottom: 30px;
font-size: 1.1rem;
line-height: 1.6;
}
/* Quick Links */
.quick-links {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin: 40px auto;
max-width: 800px;
}
.quick-link {
background: #f8f9fa;
border-radius: 12px;
padding: 20px;
text-decoration: none;
color: #333;
transition: all 0.3s;
border: 2px solid transparent;
}
.quick-link:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
border-color: #1a73e8;
}
.quick-link-icon {
font-size: 2.5rem;
color: #1a73e8;
margin-bottom: 15px;
}
.quick-link-title {
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 10px;
}
.quick-link-desc {
color: #666;
font-size: 0.9rem;
line-height: 1.4;
}
/* Bottom Navigation */
.bottom-nav {
background: white;
border-top: 1px solid #dadce0;
padding: 12px;
display: flex;
justify-content: space-around;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
color: #5f6368;
text-decoration: none;
font-size: 12px;
transition: color 0.2s;
}
.nav-item.active {
color: #1a73e8;
}
.nav-icon {
font-size: 20px;
margin-bottom: 4px;
}
/* Responsive */
@media (max-width: 768px) {
.browser-title {
display: none;
}
.quick-links {
grid-template-columns: 1fr;
}
.tab {
min-width: 100px;
max-width: 150px;
}
}
/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
body {
background: #202124;
color: #e8eaed;
}
.address-bar-container {
background: #3c4043;
}
.address-input {
color: #e8eaed;
}
.home-content {
background: #202124;
}
.quick-link {
background: #3c4043;
color: #e8eaed;
}
}
</style>
</head>
<body>
<!-- Browser Header -->
<div class="browser-header">
<div class="header-top">
<div class="browser-controls">
<button class="control-btn" id="backBtn" title="Back">
<i class="material-icons">arrow_back</i>
</button>
<button class="control-btn" id="forwardBtn" title="Forward">
<i class="material-icons">arrow_forward</i>
</button>
</div>
<div class="browser-title" id="pageTitle">
My APK Browser
</div>
<div class="browser-controls">
<button class="control-btn" id="menuBtn" title="Menu">
<i class="material-icons">more_vert</i>
</button>
</div>
</div>
<div class="address-bar-container">
<i class="material-icons security-indicator">https</i>
<input type="text"
class="address-input"
id="addressBar"
placeholder="Search or enter website address"
value="https://tinyearn.net/LYwX">
<button class="refresh-btn" id="refreshBtn" title="Refresh">
<i class="material-icons">refresh</i>
</button>
</div>
</div>
<!-- Tab System -->
<div class="tab-system">
<div class="tab active" data-tab-id="1">
<div class="tab-favicon"></div>
<div class="tab-title">Home</div>
<div class="tab-close">×</div>
</div>
<button class="new-tab-btn" id="newTabBtn">
<i class="material-icons">add</i>
</button>
</div>
<!-- Browser Content Area -->
<div class="browser-content">
<!-- Home Page -->
<div class="home-content" id="homeContent">
<h1>My APK Browser</h1>
<p>A secure browser built for your Android application</p>
<div class="quick-links">
<a href="https://tinyearn.net/LYwX" class="quick-link" data-quick-link>
<div class="quick-link-icon">🔞</div>
<div class="quick-link-title">Adults Section</div>
<div class="quick-link-desc">Access restricted content securely within the app</div>
</a>
<a href="https://google.com" class="quick-link" data-quick-link>
<div class="quick-link-icon">🌐</div>
<div class="quick-link-title">Google</div>
<div class="quick-link-desc">Search the web with Google</div>
</a>
<a href="https://youtube.com" class="quick-link" data-quick-link>
<div class="quick-link-icon">📺</div>
<div class="quick-link-title">YouTube</div>
<div class="quick-link-desc">Watch videos and entertainment</div>
</a>
<a href="https://github.com" class="quick-link" data-quick-link>
<div class="quick-link-icon">💻</div>
<div class="quick-link-title">GitHub</div>
<div class="quick-link-desc">Explore code and repositories</div>
</a>
</div>
</div>
<!-- Iframe Container for Web Content -->
<div class="iframe-container" id="iframeContainer">
<iframe class="browser-iframe"
id="browserIframe"
sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-modals"
allow="fullscreen"></iframe>
</div>
<!-- Loading Overlay -->
<div class="loading-overlay" id="loadingOverlay">
<div class="spinner"></div>
<p>Loading page...</p>
</div>
</div>
<!-- Bottom Navigation -->
<div class="bottom-nav">
<a href="#" class="nav-item active" data-nav="home">
<i class="material-icons nav-icon">home</i>
<span>Home</span>
</a>
<a href="#" class="nav-item" data-nav="tabs">
<i class="material-icons nav-icon">tab</i>
<span>Tabs</span>
</a>
<a href="#" class="nav-item" data-nav="bookmarks">
<i class="material-icons nav-icon">bookmark</i>
<span>Bookmarks</span>
</a>
<a href="#" class="nav-item" data-nav="history">
<i class="material-icons nav-icon">history</i>
<span>History</span>
</a>
<a href="#" class="nav-item" data-nav="settings">
<i class="material-icons nav-icon">settings</i>
<span>Settings</span>
</a>
</div>
<!-- Main Browser Script -->
<script>
class APKBrowser {
constructor() {
this.currentTab = '1';
this.tabs = {
'1': {
id: '1',
title: 'Home',
url: 'home',
favicon: '🏠'
}
};
this.history = [];
this.init();
}
init() {
this.bindEvents();
this.setupProtection();
this.loadInitialContent();
}
bindEvents() {
// Address bar navigation
const addressBar = document.getElementById('addressBar');
addressBar.addEventListener('keypress', (e) => {
if (e.key === 'Enter') {
this.navigateTo(addressBar.value);
}
});
// Refresh button
document.getElementById('refreshBtn').addEventListener('click', () => {
this.refreshPage();
});
// Navigation buttons
document.getElementById('backBtn').addEventListener('click', () => {
if (typeof Android !== 'undefined' && Android.goBack) {
Android.goBack();
} else {
window.history.back();
}
});
document.getElementById('forwardBtn').addEventListener('click', () => {
if (typeof Android !== 'undefined' && Android.goForward) {
Android.goForward();
} else {
window.history.forward();
}
});
// New tab button
document.getElementById('newTabBtn').addEventListener('click', () => {
this.createNewTab();
});
// Tab clicks
document.querySelectorAll('.tab').forEach(tab => {
tab.addEventListener('click', (e) => {
if (!e.target.classList.contains('tab-close')) {
this.switchTab(tab.dataset.tabId);
}
});
});
// Quick links
document.querySelectorAll('[data-quick-link]').forEach(link => {
link.addEventListener('click', (e) => {
e.preventDefault();
this.navigateTo(link.href);
});
});
// Bottom navigation
document.querySelectorAll('[data-nav]').forEach(navItem => {
navItem.addEventListener('click', (e) => {
e.preventDefault();
this.handleNavClick(navItem.dataset.nav);
});
});
}
setupProtection() {
// Block window.open completely
window.open = function(url, target, features) {
console.log('Blocked window.open to:', url);
if (url && url.includes('tinyearn.net/LYwX')) {
// Handle our specific URL internally
const browser = window.APKBrowserInstance;
if (browser) {
browser.navigateTo(url);
}
}
return null;
};
// Intercept all link clicks
document.addEventListener('click', (e) => {
const link = e.target.closest('a');
if (link && link.href) {
e.preventDefault();
e.stopPropagation();
// Check if it's external
const href = link.href;
const isExternal = href.startsWith('http') &&
!href.includes(location.hostname);
if (isExternal) {
this.navigateTo(href);
} else {
// Internal link, handle normally
window.location.href = href;
}
return false;
}
}, true);
// Override iframe navigation
const iframe = document.getElementById('browserIframe');
iframe.addEventListener('load', () => {
try {
// Inject protection into iframe
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
this.injectIframeProtection(iframeDoc);
} catch (e) {
console.log('Cannot access iframe due to CORS');
}
// Update UI
this.updatePageTitle();
this.hideLoading();
});
}
injectIframeProtection(doc) {
try {
const script = doc.createElement('script');
script.textContent = `
// Block window.open in iframe
window.open = function() { return null; };
// Make all links open in parent
document.addEventListener('click', function(e) {
const link = e.target.closest('a');
if (link && link.href) {
e.preventDefault();
if (window.parent && window.parent.APKBrowserInstance) {
window.parent.APKBrowserInstance.navigateTo(link.href);
}
return false;
}
}, true);
`;
doc.head.appendChild(script);
} catch (e) {
console.log('Cannot inject script into iframe');
}
}
navigateTo(url) {
// Add http:// if missing
if (!url.startsWith('http://') && !url.startsWith('https://')) {
if (!url.startsWith('www.')) {
url = 'https://www.google.com/search?q=' + encodeURIComponent(url);
} else {
url = 'https://' + url;
}
}
// Show loading
this.showLoading();
// Update address bar
document.getElementById('addressBar').value = url;
// Switch to iframe view
document.getElementById('homeContent').style.display = 'none';
document.getElementById('iframeContainer').classList.add('active');
// Load in iframe
const iframe = document.getElementById('browserIframe');
iframe.src = url;
// Update current tab
this.tabs[this.currentTab] = {
...this.tabs[this.currentTab],
url: url,
title: 'Loading...'
};
// Add to history
this.addToHistory(url);
}
loadInitialContent() {
// Check if we should load a specific URL
const urlParams = new URLSearchParams(window.location.search);
const initialUrl = urlParams.get('url');
if (initialUrl) {
this.navigateTo(initialUrl);
}
}
showLoading() {
document.getElementById('loadingOverlay').classList.add('active');
}
hideLoading() {
document.getElementById('loadingOverlay').classList.remove('active');
}
refreshPage() {
const iframe = document.getElementById('browserIframe');
if (iframe.src && iframe.src !== 'about:blank') {
this.showLoading();
iframe.contentWindow.location.reload();
}
}
createNewTab() {
const tabId = Date.now().toString();
this.tabs[tabId] = {
id: tabId,
title: 'New Tab',
url: 'home',
favicon: '➕'
};
this.switchTab(tabId);
this.updateTabList();
}
switchTab(tabId) {
this.currentTab = tabId;
const tab = this.tabs[tabId];
// Update active tab UI
document.querySelectorAll('.tab').forEach(t => {
t.classList.remove('active');
});
document.querySelector(`[data-tab-id="${tabId}"]`)?.classList.add('active');
// Load tab content
if (tab.url === 'home') {
document.getElementById('homeContent').style.display = 'block';
document.getElementById('iframeContainer').classList.remove('active');
document.getElementById('addressBar').value = '';
document.getElementById('pageTitle').textContent = 'My APK Browser';
} else {
document.getElementById('homeContent').style.display = 'none';
document.getElementById('iframeContainer').classList.add('active');
const iframe = document.getElementById('browserIframe');
iframe.src = tab.url;
document.getElementById('addressBar').value = tab.url;
document.getElementById('pageTitle').textContent = tab.title;
}
}
updatePageTitle() {
const iframe = document.getElementById('browserIframe');
try {
const title = iframe.contentDocument?.title || 'Web Page';
this.tabs[this.currentTab].title = title;
document.getElementById('pageTitle').textContent = title;
// Update tab title
const tabElement = document.querySelector(`[data-tab-id="${this.currentTab}"]`);
if (tabElement) {
tabElement.querySelector('.tab-title').textContent = title;
}
} catch (e) {
console.log('Cannot access iframe title');
}
}
updateTabList() {
const tabSystem = document.querySelector('.tab-system');
const tabsHtml = Object.values(this.tabs).map(tab => `
<div class="tab ${tab.id === this.currentTab ? 'active' : ''}"
data-tab-id="${tab.id}">
<div class="tab-favicon">${tab.favicon}</div>
<div class="tab-title">${tab.title}</div>
<div class="tab-close">×</div>
</div>
`).join('');
tabSystem.innerHTML = tabsHtml +
`<button class="new-tab-btn" id="newTabBtn">
<i class="material-icons">add</i>
</button>`;
// Rebind events
document.getElementById('newTabBtn').addEventListener('click', () => {
this.createNewTab();
});
document.querySelectorAll('.tab').forEach(tab => {
tab.addEventListener('click', (e) => {
if (!e.target.classList.contains('tab-close')) {
this.switchTab(tab.dataset.tabId);
}
});
});
}
addToHistory(url) {
this.history.unshift({
url: url,
timestamp: new Date().toISOString(),
title: this.tabs[this.currentTab]?.title || 'Unknown'
});
// Keep only last 50 items
if (this.history.length > 50) {
this.history.pop();
}
}
handleNavClick(navType) {
// Update active nav
document.querySelectorAll('.nav-item').forEach(item => {
item.classList.remove('active');
});
document.querySelector(`[data-nav="${navType}"]`).classList.add('active');
// Handle navigation
switch(navType) {
case 'home':
this.switchTab('1');
break;
case 'tabs':
this.showTabsModal();
break;
case 'bookmarks':
this.showBookmarks();
break;
case 'history':
this.showHistory();
break;
case 'settings':
this.showSettings();
break;
}
}
showTabsModal() {
const modalHtml = `
<div style="position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); z-index:2000; display:flex; align-items:center; justify-content:center;">
<div style="background:white; border-radius:12px; padding:20px; max-width:400px; width:90%; max-height:80vh; overflow-y:auto;">
<h3 style="margin-bottom:15px;">Tabs (${Object.keys(this.tabs).length})</h3>
${Object.values(this.tabs).map(tab => `
<div style="padding:10px; border-bottom:1px solid #eee; display:flex; align-items:center; cursor:pointer;"
onclick="window.APKBrowserInstance.switchTab('${tab.id}'); this.closest('div[style*=\"position:fixed\"]').remove();">
<div style="width:20px; height:20px; background:#1a73e8; border-radius:50%; margin-right:10px;"></div>
<div style="flex:1;">
<div style="font-weight:500;">${tab.title}</div>
<div style="font-size:12px; color:#666;">${tab.url}</div>
</div>
</div>
`).join('')}
<button style="margin-top:15px; padding:10px 20px; background:#1a73e8; color:white; border:none; border-radius:6px; width:100%; cursor:pointer;"
onclick="window.APKBrowserInstance.createNewTab(); this.closest('div[style*=\"position:fixed\"]').remove();">
New Tab
</button>
<button style="margin-top:10px; padding:10px 20px; background:#f5f5f5; color:#333; border:none; border-radius:6px; width:100%; cursor:pointer;"
onclick="this.closest('div[style*=\"position:fixed\"]').remove();">
Close
</button>
</div>
</div>
`;
document.body.insertAdjacentHTML('beforeend', modalHtml);
}
showBookmarks() {
// Show bookmarks modal
alert('Bookmarks feature would be implemented here');
}
showHistory() {
const historyHtml = this.history.map(item => `
<div style="padding:10px; border-bottom:1px solid #eee;">
<div style="font-weight:500;">${item.title}</div>
<div style="font-size:12px; color:#666;">${item.url}</div>
<div style="font-size:11px; color:#999;">${new Date(item.timestamp).toLocaleString()}</div>
</div>
`).join('');
const modalHtml = `
<div style="position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); z-index:2000; display:flex; align-items:center; justify-content:center;">
<div style="background:white; border-radius:12px; padding:20px; max-width:500px; width:90%; max-height:80vh; overflow-y:auto;">
<h3 style="margin-bottom:15px;">History (${this.history.length})</h3>
${historyHtml || '<p style="text-align:center; color:#666;">No history yet</p>'}
<button style="margin-top:15px; padding:10px 20px; background:#f5f5f5; color:#333; border:none; border-radius:6px; width:100%; cursor:pointer;"
onclick="this.closest('div[style*=\"position:fixed\"]').remove();">
Close
</button>
</div>
</div>
`;
document.body.insertAdjacentHTML('beforeend', modalHtml);
}
showSettings() {
const settingsHtml = `
<div style="position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); z-index:2000; display:flex; align-items:center; justify-content:center;">
<div style="background:white; border-radius:12px; padding:20px; max-width:400px; width:90%; max-height:80vh; overflow-y:auto;">
<h3 style="margin-bottom:15px;">Settings</h3>
<div style="margin-bottom:15px;">
<label style="display:flex; align-items:center; justify-content:space-between;">
<span>Dark Mode</span>
<input type="checkbox">
</label>
</div>
<div style="margin-bottom:15px;">
<label style="display:flex; align-items:center; justify-content:space-between;">
<span>JavaScript</span>
<input type="checkbox" checked>
</label>
</div>
<div style="margin-bottom:15px;">
<label style="display:flex; align-items:center; justify-content:space-between;">
<span>Block Popups</span>
<input type="checkbox" checked>
</label>
</div>
<button style="margin-top:15px; padding:10px 20px; background:#1a73e8; color:white; border:none; border-radius:6px; width:100%; cursor:pointer;"
onclick="window.APKBrowserInstance.clearData()">
Clear Browsing Data
</button>
<button style="margin-top:10px; padding:10px 20px; background:#f5f5f5; color:#333; border:none; border-radius:6px; width:100%; cursor:pointer;"
onclick="this.closest('div[style*=\"position:fixed\"]').remove();">
Close
</button>
</div>
</div>
`;
document.body.insertAdjacentHTML('beforeend', settingsHtml);
}
clearData() {
if (confirm('Clear all browsing data?')) {
this.history = [];
localStorage.removeItem('apkBrowserData');
alert('Data cleared successfully');
}
}
}
// Initialize browser when page loads
document.addEventListener('DOMContentLoaded', () => {
window.APKBrowserInstance = new APKBrowser();
});
</script>
</body>
</html>