一键查看历年 GitHub 的贡献图

一键查看历年 GitHub 的贡献图。

当前为 2024-04-14 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name 一键查看历年 GitHub 的贡献图
  3. // @namespace LeoKu(https://leoku.top)
  4. // @version 0.0.2
  5. // @description 一键查看历年 GitHub 的贡献图。
  6. // @author LeoKu
  7. // @match https://github.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=v2ex.com
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. ;
  14. (function () {
  15. var _a, _b;
  16. var leftCard = document.querySelector('.Layout-sidebar .h-card');
  17. if (leftCard instanceof HTMLElement) {
  18. var username_1 = (_b = (_a = document.querySelector('.vcard-username')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim();
  19. if (username_1) {
  20. var item = document.createElement('div');
  21. item.classList.add('border-top', 'color-border-muted', 'pt-3', 'mt-3', 'clearfix', 'hide-sm', 'hide-md');
  22. var title = document.createElement('h2');
  23. title.classList.add('h4', 'mb-2');
  24. title.textContent = 'Green Wall';
  25. var button = document.createElement('button');
  26. button.classList.add('btn');
  27. button.textContent = 'View All Green';
  28. item.appendChild(title);
  29. item.appendChild(button);
  30. button.addEventListener('click', function () {
  31. window.open("https://green-wall.leoku.dev/share/".concat(username_1), '_blank');
  32. });
  33. leftCard.appendChild(item);
  34. }
  35. }
  36. })();
  37.  

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址