cryptpad/customize.dist/main.js

30 lines
830 B
JavaScript
Raw Normal View History

define([
'jquery',
2017-11-23 11:28:49 +00:00
'/common/outer/local-store.js',
'/customize/messages.js',
2018-01-10 08:54:10 +00:00
], function ($, LocalStore, Messages) {
$(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');
2017-11-23 11:28:49 +00:00
if (LocalStore.isLoggedIn()) {
2017-08-04 12:35:47 +00:00
if (window.location.pathname === '/') {
window.location = '/drive/';
2017-08-04 12:37:21 +00:00
return;
2017-08-04 12:35:47 +00:00
}
$main.find('a[href="/drive/"] div.pad-button-text h4')
.text(Messages.main_yourCryptDrive);
}
2018-01-10 08:54:10 +00:00
$(window).click(function () {
$('.cp-dropdown-content').hide();
});
});
});