custom-sogo.js 726 B

1234567891011121314151617181920212223242526
  1. // redirect to mailcow login form
  2. document.addEventListener('DOMContentLoaded', function () {
  3. var loginForm = document.forms.namedItem("loginForm");
  4. if (loginForm) {
  5. window.location.href = '/user';
  6. }
  7. });
  8. // logout function
  9. function mc_logout() {
  10. fetch("/", {
  11. method: "POST",
  12. headers: {
  13. "Content-Type": "application/x-www-form-urlencoded"
  14. },
  15. body: "logout=1"
  16. }).then(() => window.location.href = '/');
  17. }
  18. // Custom SOGo JS
  19. // Change the visible font-size in the editor, this does not change the font of a html message by default
  20. CKEDITOR.addCss("body {font-size: 16px !important}");
  21. // Enable scayt by default
  22. //CKEDITOR.config.scayt_autoStartup = true;