all repos — cgit @ 5128d091c6bc1601135ac2217509cc81314bc691

a hyperfast web frontend for git written in c

disable unsafe inline styles and scripts
la-ninpre leobrekalini@gmail.com
Wed, 28 Oct 2020 17:23:13 +0100
commit

5128d091c6bc1601135ac2217509cc81314bc691

parent

adcc4f822fe11836e5f942fc1ae0f00db4eb8d5f

3 files changed, 12 insertions(+), 12 deletions(-)

jump to
M ui-commit.cui-commit.c

@@ -44,7 +44,7 @@

load_ref_decorations(NULL, DECORATE_FULL_REFS); cgit_print_layout_start(); - cgit_print_diff_ctrls(); + /*cgit_print_diff_ctrls();*/ html("<table summary='commit info' class='commit-info'>\n"); html("<tr><th>author</th><td>"); cgit_open_filter(ctx.repo->email_filter, info->author_email, "commit");
M ui-diff.cui-diff.c

@@ -113,13 +113,13 @@ return;

} htmlf("%d", info->added + info->removed); html("</td><td class='graph'>"); - htmlf("<table summary='file diffstat' width='%d%%'><tr>", (max_changes > 100 ? 100 : max_changes)); - htmlf("<td class='add' style='width: %.1f%%;'/>", - info->added * 100.0 / max_changes); - htmlf("<td class='rem' style='width: %.1f%%;'/>", - info->removed * 100.0 / max_changes); - htmlf("<td class='none' style='width: %.1f%%;'/>", - (max_changes - info->removed - info->added) * 100.0 / max_changes); + html("<table summary='file diffstat'><tr>"); + htmlf("<td class='add'>+%d</td>", + info->added /* * 100.0 / max_changes */); + htmlf("<td class='rem'>-%d</td>", + info->removed/* * 100.0 / max_changes */); +/* htmlf("<td class='none' style='width: %.1f%%;'/>", + (max_changes - info->removed - info->added) * 100.0 / max_changes);*/ html("</tr></table></td></tr>\n"); }

@@ -466,7 +466,7 @@ use_ssdiff = difftype == DIFF_SSDIFF;

if (show_ctrls) { cgit_print_layout_start(); - cgit_print_diff_ctrls(); + /* cgit_print_diff_ctrls();*/ } /*
M ui-stats.cui-stats.c

@@ -309,7 +309,7 @@ period->trunc(tm);

for (i = 1; i < period->count; i++) period->dec(tm); - html("<table class='stats'><tr><th>Author</th>"); + html("<table class='stats' width='100%'><tr><th>Author</th>"); for (j = 0; j < period->count; j++) { tmp = period->pretty(tm); htmlf("<th>%s</th>", tmp);

@@ -387,7 +387,7 @@ if (!top)

top = 10; cgit_print_layout_start(); - html("<div class='cgit-panel'>"); + /*html("<div class='cgit-panel'>"); html("<b>stat options</b>"); html("<form method='get'>"); cgit_add_hidden_formfields(1, 0, "stats");

@@ -412,7 +412,7 @@ html("<tr><td/><td class='ctrl'>");

html("<noscript><input type='submit' value='Reload'/></noscript>"); html("</td></tr></table>"); html("</form>"); - html("</div>"); + html("</div>");*/ htmlf("<h2>Commits per author per %s", period->name); if (ctx.qry.path) { html(" (path '");