From aec8083d0c176888d59f299afef642a34f424517 Mon Sep 17 00:00:00 2001 From: azivner Date: Mon, 21 Aug 2017 22:04:08 -0400 Subject: [PATCH] ctrl-alt-h now toggles visibility of everything except the main content (probably controversially also title) --- src/templates/app.html | 6 +++--- static/js/init.js | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/templates/app.html b/src/templates/app.html index 46d026f19..f871dae36 100644 --- a/src/templates/app.html +++ b/src/templates/app.html @@ -12,7 +12,7 @@
-
+
@@ -20,13 +20,13 @@
-
+
-
+
diff --git a/static/js/init.js b/static/js/init.js index 03abb1c71..c1ec81af5 100644 --- a/static/js/init.js +++ b/static/js/init.js @@ -4,4 +4,13 @@ $(function() { $('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"); + + toggle.css('visibility', toggle.css('visibility') === 'hidden' ? 'visible' : 'hidden'); }); \ No newline at end of file