Skip to content

Instantly share code, notes, and snippets.

@qerdcv
Created November 13, 2022 19:08
Show Gist options
  • Save qerdcv/6038aaee352532f45ab01d40870dc644 to your computer and use it in GitHub Desktop.
Save qerdcv/6038aaee352532f45ab01d40870dc644 to your computer and use it in GitHub Desktop.
Get total count of contributions in gitlab for current year

Just paste it into the browser console, and it will count contributions for you.

Array.from(document.querySelectorAll(".user-contrib-cell")).reduce((acc, el) => (isNaN(+acc) ? 0 : acc) + (el.getAttribute("title").trim().split(" ").length > 1 && isNaN(+el.getAttribute("title").trim().split(" ")[0]) ? 0 : +el.getAttribute("title").trim().split(" ")[0]));
@devded
Copy link

devded commented Dec 31, 2023

Wow 🤩! it works, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment