Greasy Fork 还支持 简体中文。

GitCode跳转Github

GitCode自动重定向到GitHub,修改自https://update.greasyfork.org/scripts/499081/去你的GitCode.user.js

Από την 15/01/2026. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        GitCode跳转Github
// @description GitCode自动重定向到GitHub,修改自https://update.greasyfork.org/scripts/499081/去你的GitCode.user.js
// @namespace   Violentmonkey Scripts
// @author      fcwys
// @match       https://gitcode.com/*
// @grant       none
// @version     1.3
// @license     MIT  
// ==/UserScript==
function FuckGitcode() {
  if(location.pathname.includes("/gh_mirrors/")) {
    //获取原始Github地址
    let repoId = encodeURIComponent(location.pathname.slice(1));
    let url = `https://web-api.gitcode.com/api/v2/projects/${repoId}?repoId=${repoId}&statistics=true&view=all`
    try {
        fetch(url)
        .then(response => response.json())
        .then(json => {
            window.location.href = json.import_url.replace('.git','');
        })
    } catch (error) {
        console.error("[GitCode跳转Github] 获取Github原始地址接口请求失败:", error);
    }
  }
}

FuckGitcode();