]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - app/Resources/static/themes/baggy/js/shortcuts/entry.js
Reorganized JS folders for shortcuts
[github/wallabag/wallabag.git] / app / Resources / static / themes / baggy / js / shortcuts / entry.js
diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js
new file mode 100644 (file)
index 0000000..d618f28
--- /dev/null
@@ -0,0 +1,19 @@
+/* Article view */
+Mousetrap.bind('o', () => {
+    $('div#article_toolbar ul.links li:nth-child(2) a')[0].click();
+});
+
+/* mark as favorite */
+Mousetrap.bind('s', () => {
+    $('div#article_toolbar ul.links li:nth-child(5) a')[0].click();
+});
+
+/* mark as read */
+Mousetrap.bind('a', () => {
+    $('div#article_toolbar ul.links li:nth-child(4) a')[0].click();
+});
+
+/* delete */
+Mousetrap.bind('del', () => {
+    $('div#article_toolbar ul.links li:nth-child(7) a')[0].click();
+});