-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
311 lines (273 loc) · 15.9 KB
/
index.html
File metadata and controls
311 lines (273 loc) · 15.9 KB
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<!DOCTYPE html>
<html lang="fa">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
// Deep link handler - only activates when there are meaningful parameters
document.addEventListener('DOMContentLoaded', function() {
const urlParams = new URLSearchParams(window.location.search);
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
// Check if this is from 404 redirect or has query parameters (excluding just 'from' param)
const isFrom404 = urlParams.get('from') === '404';
// Build the correct path for deep linking
let currentPath;
if (isFrom404) {
// Extract the original path from the 404 redirect
const encodedPath = urlParams.get('path') || '/';
try {
currentPath = decodeURIComponent(encodedPath);
// If it's a full file:// URL, extract just the query string
if (currentPath.includes('?')) {
currentPath = currentPath.substring(currentPath.indexOf('?'));
}
} catch(e) {
currentPath = '/';
}
} else {
// Use just the query string for deep linking
const queryString = window.location.search;
currentPath = queryString ? '/' + queryString : '/';
}
// Only show smart button on mobile devices when there are meaningful deep link params
const shouldShowSmartButton = /iPad|iPhone|iPod|android/i.test(userAgent);
if (shouldShowSmartButton) {
// Constants for URLs
const PACKAGE_NAME = "com.FlyingAcorn.NumberChain";
const BASE_URL = "https://nc.flyingacorn.studio";
const APP_STORE_LINK = "https://apps.apple.com/us/app/%D8%B2%D9%86%D8%AC%DB%8C%D8%B1%D9%87-%D8%A7%D8%B9%D8%A7%D8%AF-2248/id6569247863";
const PLAY_STORE_LINK = "https://play.google.com/store/apps/details?id=" + PACKAGE_NAME;
const MARKET_LINK = "market://details?id=" + PACKAGE_NAME;
const CAFEBAZAAR_LINK = "https://cafebazaar.ir/app/" + PACKAGE_NAME;
const MYKET_LINK = "https://myket.ir/app/" + PACKAGE_NAME;
const isIOS = /iPad|iPhone|iPod/.test(userAgent) && !window.MSStream;
const isAndroid = /android/i.test(userAgent);
const isMacOS = /Macintosh|MacIntel|MacPPC|Mac68K/i.test(userAgent);
// Create and inject the smart button
const smartButton = document.createElement('div');
smartButton.id = 'smart-open-button';
smartButton.innerHTML = `
<button class="smart-btn">
<span class="btn-text">همین حالا نصب کن</span>
<span class="btn-icon">📱</span>
<span class="btn-close">×</span>
</button>
`;
// Add styles
const style = document.createElement('style');
style.textContent = `
#smart-open-button {
position: fixed;
top: max(10px, 2vh);
left: 50%;
transform: translateX(-50%);
z-index: 9999;
animation: slideDown 0.5s ease-out;
padding: 0 10px;
box-sizing: border-box;
}
.smart-btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 0.4em 2.5em 0.4em 1em;
border-radius: 50px;
font-size: clamp(12px, 3.5vw, 16px);
font-weight: 600;
font-family: 'YekanBakh', 'Poppins', sans-serif;
cursor: pointer;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
display: inline-flex;
align-items: center;
gap: 0.4em;
transition: all 0.3s ease;
position: relative;
white-space: nowrap;
max-width: calc(100vw - 20px);
}
.smart-btn:active {
transform: scale(0.95);
}
.btn-icon {
font-size: 1.2em;
}
.btn-close {
position: absolute;
right: 0.5em;
top: 50%;
transform: translateY(-50%);
font-size: 1em;
font-weight: bold;
color: rgba(255, 255, 255, 0.7);
cursor: pointer;
padding: 0.1em;
border-radius: 50%;
transition: all 0.2s ease;
width: 1.2em;
height: 1.2em;
display: flex;
align-items: center;
justify-content: center;
}
.btn-close:hover {
color: white;
background: rgba(255, 255, 255, 0.2);
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateX(-50%) translateY(-20px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}
`;
document.head.appendChild(style);
document.body.appendChild(smartButton);
// Handle button click
smartButton.querySelector('.smart-btn').addEventListener('click', function(e) {
e.preventDefault();
// Check if the close button was clicked
if (e.target.classList.contains('btn-close')) {
// Close button clicked - smooth fade out and remove
smartButton.style.transition = 'opacity 0.3s ease-out';
smartButton.style.opacity = '0';
setTimeout(() => {
smartButton.remove();
}, 300);
return;
}
// Main button clicked - proceed with install logic
// Use full URL for deep link (required for Universal Links/App Links)
const appLink = BASE_URL + currentPath;
// Update button state immediately
this.innerHTML = '<span class="btn-icon">⏳</span><span class="btn-text">در حال باز کردن...</span>';
this.style.opacity = '0.7';
this.disabled = true;
// Hide button after 3 seconds
setTimeout(() => {
smartButton.style.transition = 'opacity 0.5s ease-out';
smartButton.style.opacity = '0';
setTimeout(() => {
smartButton.remove();
}, 500);
}, 3000);
let appOpened = false;
const startTime = Date.now();
// Try to open the app - use different methods for different platforms
if (isIOS) {
// For iOS, attempt to open the app via Universal Link
// Try opening the app without navigation
const iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.src = appLink;
document.body.appendChild(iframe);
// Check if app opened after a delay
setTimeout(() => {
document.body.removeChild(iframe);
// If the page is still visible, the app didn't open
if (document.visibilityState === "visible") {
window.location.href = APP_STORE_LINK;
}
}, 2500);
} else if (isAndroid) {
// For Android, use the proven approach from original 404.html
// Open the market link directly
window.location.href = MARKET_LINK;
// Fallback to Google Play if the app is not installed (but user said to drop this)
// Keeping it simple - just try market://
} else {
// On desktop, show message immediately
alert('این بازی فقط برای موبایل در دسترس است. لطفا از طریق اپ استور یا گوگل پلی دانلود کنید.');
return; // Don't continue with the rest of the logic
}
// Detect if app opened by monitoring visibility and blur
const checkAppOpened = function() {
appOpened = true;
// Only close the opened window for Android (iOS doesn't use window.open)
if (isAndroid && newWindow && !newWindow.closed) {
newWindow.close();
}
};
document.addEventListener('visibilitychange', function() {
if (document.visibilityState === 'hidden') {
checkAppOpened();
}
});
window.addEventListener('blur', checkAppOpened);
window.addEventListener('pagehide', checkAppOpened);
// Set up fallback to store after timeout (none needed for current logic)
// iOS handles its own fallback, Android just tries market://
});
// Remove the separate close button event listener since it's now integrated
}
});
</script>
<title>زنجیره اعداد: 2248 - بازی پازلی سرگرمکننده</title>
<meta name="description" content="دانلود بازی زنجیره اعداد: 2248، یک بازی پازلی سرگرمکننده و اعتیادآور. در دسترس در اپ استور، گوگل پلی، کافه بازار و مایکت.">
<meta name="keywords" content="بازی، پازل، زنجیره اعداد، 2248، موبایل، اندروید، iOS">
<meta name="author" content="Flying Acorn">
<meta name="robots" content="index, follow">
<meta name="language" content="fa">
<meta name="revisit-after" content="7 days">
<!-- Open Graph Tags -->
<meta property="og:title" content="زنجیره اعداد: 2248 - بازی پازلی سرگرمکننده">
<meta property="og:description" content="دانلود بازی زنجیره اعداد: 2248، یک بازی پازلی سرگرمکننده و اعتیادآور. در دسترس در اپ استور، گوگل پلی، کافه بازار و مایکت.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://nc.flyingacorn.studio">
<meta property="og:image" content="https://nc.flyingacorn.studio/assets/images/Cover.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:locale" content="fa_IR">
<!-- Twitter Card Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="زنجیره اعداد: 2248 - بازی پازلی سرگرمکننده">
<meta name="twitter:description" content="دانلود بازی زنجیره اعداد: 2248، یک بازی پازلی سرگرمکننده و اعتیادآور.">
<meta name="twitter:image" content="https://nc.flyingacorn.studio/assets/images/Cover.png">
<!-- Additional SEO Tags -->
<meta name="theme-color" content="#667eea">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="زنجیره اعداد">
<link rel="canonical" href="https://nc.flyingacorn.studio">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/styles/main.css">
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon/favicon-16x16.png">
<link rel="manifest" href="assets/favicon/site.webmanifest">
</head>
<body>
<header class="game-header">
<img src="assets/images/Cover.png" alt="تصویر اصلی بازی 2248" class="game-main-image responsive-image">
<h1>زنجیره اعداد: 2248</h1>
<p>یک بازی پازلی سرگرمکننده که ذهن شما را به چالش میکشد!</p>
</header>
<main class="game-content">
<section class="download-section">
<h2>همین حالا دانلود کنید</h2>
<div class="download-buttons">
<a href="https://cafebazaar.ir/app/com.FlyingAcorn.NumberChain" class="btn download-btn" target="_blank" rel="noopener">
<img src="assets/images/icons/cafebazaar.svg" alt="کافه بازار" class="responsive-icon"> کافه بازار
</a>
<a href="https://myket.ir/app/com.FlyingAcorn.NumberChain" class="btn download-btn" target="_blank" rel="noopener">
<img src="assets/images/icons/myket.svg" alt="مایکت" class="responsive-icon"> مایکت
</a>
<a href="https://play.google.com/store/apps/details?id=com.FlyingAcorn.NumberChain" class="btn download-btn" target="_blank" rel="noopener">
<img src="assets/images/icons/googleplay.svg" alt="گوگل پلی" class="responsive-icon"> گوگل پلی
</a>
<a href="https://apps.apple.com/us/app/%D8%B2%D9%86%D8%AC%DB%8C%D8%B1%D9%87-%D8%A7%D8%B9%D8%A7%D8%AF-2248/id6569247863" class="btn download-btn" target="_blank" rel="noopener">
<img src="assets/images/icons/appstore.svg" alt="اپ استور" class="responsive-icon"> اپ استور
</a>
</div>
</section>
</main>
<footer class="game-footer">
<p>© 2026 Flying Acorn. تمامی حقوق محفوظ است.</p>
</footer>
<script src="assets/js/main.js" defer></script>
</body>
</html>