trilium/static/js/init.js

17 lines
665 B
JavaScript
Raw Normal View History

$(function() {
$(window).resize(function() {
$('div#tree').height($(window).height() - $('div#tree').offset().top);
$('div.note-editable').height($(window).height() - $('div.note-editable').offset().top);
});
$(window).resize();
});
jQuery.hotkeys.options.filterInputAcceptingElements = true;
jQuery.hotkeys.options.filterContentEditable = true;
$(document).bind('keypress', 'alt+ctrl+h', function() {
const toggle = $(".hide-toggle");
2017-08-23 08:19:46 +08:00
// use visibility instead of display so that content isn't moved around and stays set in place
toggle.css('visibility', toggle.css('visibility') === 'hidden' ? 'visible' : 'hidden');
});