GitCode跳转Github

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

15.01.2026 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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();