cryptpad/customize.dist/main.js

30 lines
854 B
JavaScript
Raw Normal View History

2023-10-20 22:35:26 +08:00
// SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
//
// SPDX-License-Identifier: AGPL-3.0-or-later
define([
'jquery',
2017-11-23 19:28:49 +08:00
'/common/outer/local-store.js',
2018-11-06 00:33:04 +08:00
], function ($, LocalStore) {
$(function () {
var $main = $('#mainBlock');
// main block is hidden in case javascript is disabled
$main.removeClass('hidden');
// Make sure we don't display non-translated content (empty button)
$main.find('#data').removeClass('hidden');
if (LocalStore.isLoggedIn() && LocalStore.getDriveRedirectPreference()) {
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
}
}
2018-01-10 16:54:10 +08:00
$(window).click(function () {
$('.cp-dropdown-content').hide();
});
});
});