Skip to content

Instantly share code, notes, and snippets.

@mootoh
Created March 15, 2016 22:25
Show Gist options
  • Save mootoh/02a4dcda1fc7e1a79023 to your computer and use it in GitHub Desktop.
Save mootoh/02a4dcda1fc7e1a79023 to your computer and use it in GitHub Desktop.
crowi shortcut key to edit page
From cafa54547e4043b6bab3e9becba0fb1215cdd9db Mon Sep 17 00:00:00 2001
From: Motohiro Takayama <[email protected]>
Date: Tue, 15 Mar 2016 15:24:11 -0700
Subject: [PATCH] Shift+E to edit in Page
---
lib/views/page.html | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/views/page.html b/lib/views/page.html
index d52f6e9..e6764a1 100644
--- a/lib/views/page.html
+++ b/lib/views/page.html
@@ -260,4 +260,10 @@
});
});
</script>
+ <script src="/js/mousetrap.min.js"></script>
+ <script>
+ Mousetrap.bind('E', function() {
+ $('.content-main a[data-toggle="tab"][href="#edit-form"').tab('show');
+ });
+ </script>
{% endblock %}
--
2.7.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment