diff options
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index ef05eb2fb..43b0384e8 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -220,6 +220,13 @@ function collapse_entry() { $(".flux.current").toggleClass("active"); } +function auto_share() { + var share = $(".flux.current.active").find('.dropdown-target[id^="dropdown-share"]'); + if (share.length) { + window.location.replace('/i/#' + share.attr('id')); + } +} + function inMarkViewport(flux, box_to_follow, relative_follow) { var top = flux.position().top; if (relative_follow) { @@ -338,6 +345,11 @@ function init_shortcuts() { }, { 'disable_in_input': true }); + shortcut.add(shortcuts.auto_share, function () { + auto_share(); + }, { + 'disable_in_input': true + }); // Touches de navigation shortcut.add(shortcuts.prev_entry, prev_entry, { |
