diff options
author | silverwind <me@silverwind.io> | 2020-11-16 00:50:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-15 23:50:06 +0000 |
commit | efcba9b011b328a425d8b2c8d9f2273bfbaa7340 (patch) | |
tree | 92f7812aa0f184b6b76b957eee56d19b14f31ef6 /web_src/js | |
parent | 0de546009e466486cd88dfa98d07d8775bd3087d (diff) | |
download | gitea-efcba9b011b328a425d8b2c8d9f2273bfbaa7340.tar.gz gitea-efcba9b011b328a425d8b2c8d9f2273bfbaa7340.zip |
Render diff stats server-side (#13579)
Eliminates a flash on page load on the diff stat bars.
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/index.js | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index 1d36dcf6b2..1f4c9a509a 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1134,17 +1134,6 @@ async function initRepository() { initReactionSelector(); } - // Diff - if ($('.repository.diff').length > 0) { - $('.diff-counter').each(function () { - const $item = $(this); - const addLine = $item.find('span[data-line].add').data('line'); - const delLine = $item.find('span[data-line].del').data('line'); - const addPercent = parseFloat(addLine) / (parseFloat(addLine) + parseFloat(delLine)) * 100; - $item.find('.bar .add').css('width', `${addPercent}%`); - }); - } - // Quick start and repository home $('#repo-clone-ssh').on('click', function () { $('.clone-url').text($(this).data('link')); |