Updatweb
This commit is contained in:
38
website/admin/test-inline-logout.html
Normal file
38
website/admin/test-inline-logout.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user