Skip to content

Commit

Permalink
[SOGo] remove custom logout from toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddleSpl0it committed Feb 26, 2024
1 parent d237157 commit 881c2d6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions data/conf/sogo/custom-sogo.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,16 @@ document.addEventListener('DOMContentLoaded', function () {
return false;
}
function mcElementsExists() {
if (document.getElementById("mc_logout"))
if (document.getElementById("mc_backlink"))
return true;
else
return false;
}
function addMCElements() {
const toolbarElement = document.body.querySelector('.md-toolbar-tools.sg-toolbar-group-last.layout-align-end-center.layout-row');
var htmlCode = '<a class="md-icon-button md-button md-ink-ripple" aria-label="mailcow" href="/user" aria-hidden="false" tabindex="-1">' +
var htmlCode = '<a id="mc_backlink" class="md-icon-button md-button md-ink-ripple" aria-label="mailcow" href="/user" aria-hidden="false" tabindex="-1">' +
'<md-icon class="material-icons" role="img" aria-label="build">build</md-icon>' +
'</a><a class="md-icon-button md-button md-ink-ripple" aria-label="mailcow" href="#" onclick="mc_logout.submit()" aria-hidden="false" tabindex="-1">' +
'<md-icon class="material-icons" role="img" aria-label="settings_power">settings_power</md-icon>' +
'</a><form action="/" method="post" id="mc_logout"><input type="hidden" name="logout"></form>';
'</a>';
toolbarElement.insertAdjacentHTML('beforeend', htmlCode);
}

Expand Down

0 comments on commit 881c2d6

Please sign in to comment.