Penambahan Sementara Pengajuan Presensi WhatsApp
This commit is contained in:
@@ -36,7 +36,26 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p class="text-muted small">Anda dapat menutup halaman ini.</p>
|
||||
<p class="text-muted small" id="countdown-text">Halaman akan ditutup dalam <strong id="countdown">5</strong> detik...</p>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script>
|
||||
let seconds = 5;
|
||||
const countdownEl = document.getElementById('countdown');
|
||||
const timer = setInterval(() => {
|
||||
seconds--;
|
||||
if (countdownEl) { countdownEl.textContent = seconds; }
|
||||
|
||||
if (seconds <= 0) {
|
||||
clearInterval(timer);
|
||||
window.close();
|
||||
setTimeout(() => {
|
||||
document.getElementById('countdown-text').textContent = 'Silakan tutup tab ini secara manual.';
|
||||
}, 500);
|
||||
}
|
||||
}, 1000);
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user