2016-07-04 21:21:23 +08:00
|
|
|
define([
|
2017-04-18 18:14:32 +08:00
|
|
|
'jquery',
|
2017-11-23 19:28:49 +08:00
|
|
|
'/common/outer/local-store.js',
|
2018-11-06 00:33:04 +08:00
|
|
|
], function ($, LocalStore) {
|
2016-08-31 00:15:43 +08:00
|
|
|
|
2017-02-10 01:53:04 +08:00
|
|
|
$(function () {
|
|
|
|
var $main = $('#mainBlock');
|
2017-02-03 01:09:27 +08:00
|
|
|
|
2017-02-10 01:53:04 +08:00
|
|
|
// main block is hidden in case javascript is disabled
|
|
|
|
$main.removeClass('hidden');
|
2017-02-03 01:09:27 +08:00
|
|
|
|
2017-02-10 01:53:04 +08:00
|
|
|
// Make sure we don't display non-translated content (empty button)
|
|
|
|
$main.find('#data').removeClass('hidden');
|
2017-01-31 19:43:28 +08:00
|
|
|
|
2017-11-23 19:28:49 +08:00
|
|
|
if (LocalStore.isLoggedIn()) {
|
2017-08-04 20:35:47 +08:00
|
|
|
if (window.location.pathname === '/') {
|
|
|
|
window.location = '/drive/';
|
2017-08-04 20:37:21 +08:00
|
|
|
return;
|
2017-08-04 20:35:47 +08:00
|
|
|
}
|
2017-02-03 17:48:15 +08:00
|
|
|
}
|
2018-01-10 16:54:10 +08:00
|
|
|
$(window).click(function () {
|
|
|
|
$('.cp-dropdown-content').hide();
|
2017-02-10 23:49:17 +08:00
|
|
|
});
|
2017-02-10 01:53:04 +08:00
|
|
|
});
|
2016-07-04 21:21:23 +08:00
|
|
|
});
|