Greasy Fork is available in English.

去你的GitCode

GitCode自动重定向到GitHub, 拒绝赤石

< Valutazione su 去你的GitCode

Domanda/commento

§
Pubblicato: 30/06/2024

现在 GitCode 改用随机字符串命名,找不到原作者信息

§
Pubblicato: 30/06/2024

帮你修改一下代码,实测有效

function exec() {
  let target = "https://gitcode.com/Gitcode-offical-team/GitCode-Docs/issues/198"
  if (window.location.href == target){
    return;
  }
  alert("傻逼GitCode");
  if (window.location.pathname == "/") {
    window.location.href = target
  } else {
     let remove = window.location.pathname.replace('/overview',''); // 删除地址栏中的"/overview"
    window.location.href = "https://github.com" + remove;
  }
}

Pubblica risposta

Accedi per pubblicare una risposta.