{:uriI"file:///Users/chrismo/modev/clwiki/app/assets/javascripts/cl_wiki/shortcuts.js?type=application/javascript&pipeline=self&id=d5772e5aaa4f234879e502a39d89fa4607fe5d78797bb9bc83d5093151bc4037:ET:load_pathI"7/Users/chrismo/modev/clwiki/app/assets/javascripts;T: filenameI"L/Users/chrismo/modev/clwiki/app/assets/javascripts/cl_wiki/shortcuts.js;T: nameI"cl_wiki/shortcuts;T:logical_pathI"cl_wiki/shortcuts.self.js;T:content_typeI"application/javascript;T: sourceI"}function navigateToPage(page) { let url = new URL(window.location.href).href; window.location.href = url.substring(0, url.lastIndexOf('/')) + '/' + page; } function commonShortcuts(e) { if (e.key === "f") { navigateToPage('find'); } else if (e.key === "h") { navigateToPage('FrontPage'); } else if (e.key === "r") { navigateToPage('recent'); } } $(document).keydown(function (e) { if (window.location.href.endsWith("/edit")) { } else if (window.location.href.endsWith("/find")) { } else if (window.location.href.endsWith("/login")) { // this is important otherwise typing `e` while logging in refreshes the // page - doh! } else if (window.location.href.endsWith("/recent")) { commonShortcuts(e); } else { if (e.key === "e") { window.location.href = window.location.href + "/edit"; } else { commonShortcuts(e); } } }); ;T: metadata{:dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"Zfile-digest:///Users/chrismo/modev/clwiki/app/assets/javascripts/cl_wiki/shortcuts.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: to_loado;;}F: to_linko;;}F:map{ I" version;TiI" file;TI"cl_wiki/shortcuts.js;TI" mappings;TI"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;TI" sources;T[I"shortcuts.source.js;TI" names;T[I"x_sprockets_linecount;Ti$: charsetI" utf-8;F: digest"%NB!wNEH#6ՠ2zĴy: lengthi}:environment_versionI"1.0;T:dependencies_digest"%zC1 r>1Y,:idI"Ed5772e5aaa4f234879e502a39d89fa4607fe5d78797bb9bc83d5093151bc4037;F