main.js 669 B

12345678910111213141516171819202122232425
  1. define([
  2. 'jquery',
  3. '/common/outer/local-store.js',
  4. ], function ($, LocalStore) {
  5. $(function () {
  6. var $main = $('#mainBlock');
  7. // main block is hidden in case javascript is disabled
  8. $main.removeClass('hidden');
  9. // Make sure we don't display non-translated content (empty button)
  10. $main.find('#data').removeClass('hidden');
  11. if (LocalStore.isLoggedIn()) {
  12. if (window.location.pathname === '/') {
  13. window.location = '/drive/';
  14. return;
  15. }
  16. }
  17. $(window).click(function () {
  18. $('.cp-dropdown-content').hide();
  19. });
  20. });
  21. });