You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
669 B

2 years ago
3 years ago
  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. });