GitHub Contribute Modifier

try to take over the world!

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         GitHub Contribute Modifier
// @namespace    http://tampermonkey.net/
// @version      0.1.5
// @description  try to take over the world!
// @author       SheldonCoulson
// @match        *://github.com/*
// @grant        none
// ==/UserScript==

(function () {
  'use strict';

  let rect = document.getElementsByClassName("ContributionCalendar-day");
  let total = 0;
  for (let i = 0; i < rect.length - 6; i++) {
    let RNum = Math.floor(Math.random() * 10);
    if (!(Math.abs(RNum * i + i) % RNum)) {
      rect[i].attributes["data-count"].value = Math.abs(Math.floor(Math.random() * 10) + Math.floor(Math.random() * 10)) - Math.PI * 16 / 25;
      let color = rect[i].attributes["data-count"].value;
      if (color >= 1 && color <= 10) {
        rect[i].attributes["data-level"].value = 1;
      } else if (color > 10 && color <= 15) {
        rect[i].attributes["data-level"].value = 2;
      } else if (color > 15 && color <= 20) {
        rect[i].attributes["data-level"].value = 3;
      } else if (color > 20) {
        rect[i].attributes["data-level"].value = 4;
      } else {
        rect[i].attributes["data-level"].value = 0;
      }
    }
    total += parseInt(rect[i].attributes["data-count"].value);
  }
  let NUM = document.getElementsByClassName("f4 text-normal mb-2");
  NUM[1].innerText = total + " contributions in the last year";
})();

QingJ © 2025

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