This commit is contained in:
harshil05133 2025-04-18 22:09:38 +05:30 committed by GitHub
commit d31b30ab86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 109 additions and 3 deletions

View file

@ -387,6 +387,22 @@ exports.padeditbar = new class {
$('#myusernameedit').trigger('focus');
});
this.registerCommand('gohome', () => {
console.log('Go Home button clicked');
window.location.href = '/';
});
this.registerCommand('logout', () => {
console.log('Logout button clicked');
// Clear session or authentication token
fetch('/logout', { method: 'POST' })
.then(response => {
if (response.ok) {
window.location.href = '/'; // Redirect to the home page
}
});
});
this.registerCommand('embed', () => {
this.setEmbedLinks();
this.toggleDropDown('embed');