aboutsummaryrefslogtreecommitdiffstats
path: root/ui-summary.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-summary.c')
-rw-r--r--ui-summary.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui-summary.c b/ui-summary.c
index 1b65462..f3b3d92 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -29,9 +29,12 @@ static void print_url(const char *url)
29 if (urls++ == 0) { 29 if (urls++ == 0) {
30 htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns); 30 htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
31 htmlf("<tr class='nohover'><th class='left' colspan='%d'>clone</th></tr>\n", columns); 31 htmlf("<tr class='nohover'><th class='left' colspan='%d'>clone</th></tr>\n", columns);
32 html("<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'></script>");
33 html("<script>\n");
34 html("$(document).ready(function() { $('.copy').click(function(e) { var tmp = $('<input>'); $('body').append(tmp); tmp.val($(this).text()).select(); document.execCommand('copy'); tmp.remove(); e.preventDefault(); }); });\n");
35 html("</script>");
32 } 36 }
33 37
34 html("<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'></script>");
35 htmlf("<tr><td colspan='%d'><a class='copy' rel='vcs-git' href='", columns); 38 htmlf("<tr><td colspan='%d'><a class='copy' rel='vcs-git' href='", columns);
36 html_url_path(url); 39 html_url_path(url);
37 html("' title='"); 40 html("' title='");
@@ -39,9 +42,6 @@ static void print_url(const char *url)
39 html(" git repository'>"); 42 html(" git repository'>");
40 html_txt(url); 43 html_txt(url);
41 html("</a><span class='hint'> (click to copy)</span></td></tr>\n"); 44 html("</a><span class='hint'> (click to copy)</span></td></tr>\n");
42 html("<script>\n");
43 html("$(document).ready(function() { $('.copy').click(function(e) { var tmp = $('<input>'); $('body').append(tmp); tmp.val($(this).text()).select(); document.execCommand('copy'); tmp.remove(); e.preventDefault(); }); });\n");
44 html("</script>");
45} 45}
46 46
47void cgit_print_summary(void) 47void cgit_print_summary(void)