diff options
| author | 2014-01-03 05:05:53 -0800 | |
|---|---|---|
| committer | 2014-01-03 05:05:53 -0800 | |
| commit | c4ad9c531bbbbf49119802596949a17861510afe (patch) | |
| tree | 3ffc8d2eaabe282019104d39c8ebfab6c1aed45d /p/scripts | |
| parent | b339ce852696ef641871e097489aeb511c5dfae8 (diff) | |
| parent | 839477eb85f7ac0fa4e5d80574547060c87f743a (diff) | |
Merge pull request #340 from aledeg/partage
Partage d'article
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, { |
