class App { static Version = '#_version_'; static CookieName = 'doczilla_js_docs_cookie'; static CodeMirrorProperties = { Value: 'value', Mode: 'mode', Readonly: 'readOnly', LineNumbers: 'lineNumbers', MatchBrackets: 'matchBrackets', ScrollbarStyle: 'scrollbarStyle', Theme: 'theme', ConfigureMouse: 'configureMouse' }; static start() { typeof $ !== 'undefined' && $('.left').length > 0 && $('.left').resizable({ 'handles': 'e' }); const mainTitle = DOM.get('.main-title'); mainTitle && mainTitle.on('click', (e) => Url.goTo('/')); const loginButton = DOM.get('.login-button'); loginButton && loginButton.on('click', (e) => Url.goTo('/login')); const logoutButton = DOM.get('.logout-button'); logoutButton && logoutButton.on('click', (e) => { if(confirm('Do you really want to logout?')) fetch('/logout', { method: 'POST' }).then(() => { Url.reload(); }); }); } } window_.on(DOM.Events.Load, (e) => { App.start(); }); DOM.documentOn(DOM.Events.ContextMenu, e => e.preventDefault());