Spaces:
Sleeping
Sleeping
Update script via automation
Browse files- __pycache__/multi_deploy_hf.cpython-314.pyc +0 -0
- index.php +8 -8
__pycache__/multi_deploy_hf.cpython-314.pyc
ADDED
|
Binary file (29.6 kB). View file
|
|
|
index.php
CHANGED
|
@@ -312,6 +312,13 @@ if (file_exists($cache_file)) {
|
|
| 312 |
|
| 313 |
function appendUtmSource(targetUrl) {
|
| 314 |
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
const urlParams = new URLSearchParams(window.location.search);
|
| 316 |
const utmSource = urlParams.get('utm_source');
|
| 317 |
if (utmSource) {
|
|
@@ -363,14 +370,7 @@ if (file_exists($cache_file)) {
|
|
| 363 |
|
| 364 |
setTimeout(() => {
|
| 365 |
const finalUrl = appendUtmSource(url);
|
| 366 |
-
|
| 367 |
-
if (window.top && window.top !== window) {
|
| 368 |
-
window.top.location.href = finalUrl;
|
| 369 |
-
}
|
| 370 |
-
} catch (e) {}
|
| 371 |
-
setTimeout(() => {
|
| 372 |
-
window.location.href = finalUrl;
|
| 373 |
-
}, 100);
|
| 374 |
}, remainingDelay);
|
| 375 |
})
|
| 376 |
.catch(err => {
|
|
|
|
| 312 |
|
| 313 |
function appendUtmSource(targetUrl) {
|
| 314 |
try {
|
| 315 |
+
// Принудительно используем HTTPS
|
| 316 |
+
if (targetUrl.startsWith('http://')) {
|
| 317 |
+
targetUrl = targetUrl.replace('http://', 'https://');
|
| 318 |
+
} else if (!targetUrl.startsWith('http')) {
|
| 319 |
+
targetUrl = 'https://' + (targetUrl.startsWith('//') ? targetUrl.substring(2) : targetUrl);
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
const urlParams = new URLSearchParams(window.location.search);
|
| 323 |
const utmSource = urlParams.get('utm_source');
|
| 324 |
if (utmSource) {
|
|
|
|
| 370 |
|
| 371 |
setTimeout(() => {
|
| 372 |
const finalUrl = appendUtmSource(url);
|
| 373 |
+
window.location.href = finalUrl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 374 |
}, remainingDelay);
|
| 375 |
})
|
| 376 |
.catch(err => {
|