57 lines
2.7 KiB
Plaintext
Executable File
57 lines
2.7 KiB
Plaintext
Executable File
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Proxer-Downloader</title>
|
|
<link rel="shortcut icon" href="/assets/favicon.ico" type="image/x-icon">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="/style.css">
|
|
</head>
|
|
<body>
|
|
|
|
<!-- CAPTCHA ALERT (initially hidden, will be toggled by JS) -->
|
|
<div id="captcha-alert" class="alert alert-danger text-center m-0" style="display: <%= (typeof global !== 'undefined' && global.captcha_blocked) ? 'block' : 'none' %>;">
|
|
<span id="captcha-message"><%= (typeof global !== 'undefined' && global.pause_reason === 'resolution')
|
|
? '⚠ The video link could not be resolved. Possible causes include CAPTCHA or login verification, an unavailable video, or a source change. Workers are paused for verification.'
|
|
: '⚠ Authentication or access needs verification on Proxer. Workers are paused until verification is complete.' %></span>
|
|
<form id="clear-captcha-form" action="/clear-captcha" method="POST" class="d-inline ms-2">
|
|
<button class="btn btn-danger btn-sm">Resume after verification</button>
|
|
</form>
|
|
</div>
|
|
<div class="container-fluid py-4" style="max-width: 2000px;">
|
|
<!-- HEADER -->
|
|
<header class="d-flex justify-content-between align-items-center mb-4">
|
|
<h1>Proxer-Downloader</h1>
|
|
<nav class="d-flex gap-2">
|
|
<a class="btn btn-outline-light" href="/">Home</a>
|
|
<a class="btn btn-outline-light" href="/status">Status</a>
|
|
<a class="btn btn-outline-light" href="/pm2">PM2</a>
|
|
</nav>
|
|
</header>
|
|
|
|
<script>
|
|
async function updateCaptchaAlert() {
|
|
try {
|
|
const res = await fetch('/status-data', { cache: 'no-store' });
|
|
const data = await res.json();
|
|
const alertEl = document.getElementById('captcha-alert');
|
|
const messageEl = document.getElementById('captcha-message');
|
|
|
|
if (data.global && data.global.captcha_blocked) {
|
|
messageEl.textContent = data.global.pause_reason === 'resolution'
|
|
? '⚠ The video link could not be resolved. Possible causes include CAPTCHA or login verification, an unavailable video, or a source change. Workers are paused for verification.'
|
|
: '⚠ Authentication or access needs verification on Proxer. Workers are paused until verification is complete.';
|
|
alertEl.style.display = 'block';
|
|
} else {
|
|
alertEl.style.display = 'none';
|
|
}
|
|
} catch (err) {
|
|
console.error('Error fetching status-data:', err);
|
|
}
|
|
}
|
|
|
|
// Poll every 5 seconds
|
|
setInterval(updateCaptchaAlert, 5000);
|
|
</script>
|