39 lines
1.1 KiB
HTML
39 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Test Inline Logout</title>
|
|
<script src="/admin/js/auth.js"></script>
|
|
</head>
|
|
<body>
|
|
<h1>Testing inline onclick="logout()"</h1>
|
|
|
|
<button class="btn-logout" onclick="logout()">
|
|
Test Inline onclick Logout
|
|
</button>
|
|
|
|
<div id="result" style="margin-top: 20px; font-family: monospace;"></div>
|
|
|
|
<script>
|
|
const resultDiv = document.getElementById('result');
|
|
|
|
function log(msg) {
|
|
resultDiv.innerHTML += msg + '<br>';
|
|
console.log(msg);
|
|
}
|
|
|
|
window.addEventListener('load', function() {
|
|
log('Page loaded');
|
|
log('typeof logout: ' + typeof logout);
|
|
log('typeof window.logout: ' + typeof window.logout);
|
|
log('typeof window.showLogoutConfirm: ' + typeof window.showLogoutConfirm);
|
|
|
|
if (typeof logout === 'function') {
|
|
log('✅ logout() function exists at global scope');
|
|
} else {
|
|
log('❌ logout() function NOT found at global scope');
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|