| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,20 +38,24 @@ $(document).ready(function() { | |||
| 38 | 38 | }); | |
| 39 | 39 | ||
| 40 | 40 | // define the behavior of the button when it's clicked | |
| 41 | - $('.copybutton').toggle( | ||
| 42 | - function() { | ||
| 43 | - var button = $(this); | ||
| 41 | + $('.copybutton').click(function(e){ | ||
| 42 | + e.preventDefault(); | ||
| 43 | + var button = $(this); | ||
| 44 | + if (button.data('hidden') === 'false') { | ||
| 45 | + // hide the code output | ||
| 44 | 46 | button.parent().find('.go, .gp, .gt').hide(); | |
| 45 | 47 | button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); | |
| 46 | 48 | button.css('text-decoration', 'line-through'); | |
| 47 | 49 | button.attr('title', show_text); | |
| 48 | - }, | ||
| 49 | - function() { | ||
| 50 | - var button = $(this); | ||
| 50 | + button.data('hidden', 'true'); | ||
| 51 | + } else { | ||
| 52 | + // show the code output | ||
| 51 | 53 | button.parent().find('.go, .gp, .gt').show(); | |
| 52 | 54 | button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); | |
| 53 | 55 | button.css('text-decoration', 'none'); | |
| 54 | 56 | button.attr('title', hide_text); | |
| 55 | - }); | ||
| 57 | + button.data('hidden', 'false'); | ||
| 58 | + } | ||
| 59 | + }); | ||
| 56 | 60 | }); | |
| 57 | 61 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1533,6 +1533,7 @@ Kevin Walzer | |||
| 1533 | 1533 | Rodrigo Steinmuller Wanderley | |
| 1534 | 1534 | Dingyuan Wang | |
| 1535 | 1535 | Ke Wang | |
| 1536 | + Liang-Bo Wang | ||
| 1536 | 1537 | Greg Ward | |
| 1537 | 1538 | Tom Wardill | |
| 1538 | 1539 | Zachary Ware | |
| Back | FazBrowse Home | New Git URL |
0 commit comments