aboutsummaryrefslogtreecommitdiffstats
path: root/ui-summary.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-summary.c')
-rw-r--r--ui-summary.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ui-summary.c b/ui-summary.c
index 947812a..1b65462 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -28,16 +28,20 @@ static void print_url(const char *url)
28 28
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 } 32 }
33 33
34 htmlf("<tr><td colspan='%d'><a rel='vcs-git' href='", columns); 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);
35 html_url_path(url); 36 html_url_path(url);
36 html("' title='"); 37 html("' title='");
37 html_attr(ctx.repo->name); 38 html_attr(ctx.repo->name);
38 html(" Git repository'>"); 39 html(" git repository'>");
39 html_txt(url); 40 html_txt(url);
40 html("</a></td></tr>\n"); 41 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>");
41} 45}
42 46
43void cgit_print_summary(void) 47void cgit_print_summary(void)