去你的GitCode

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

< Feedback on 去你的GitCode

Question/comment

§
Posted: 30/06/2024

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

§
Posted: 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;
  }
}

Post reply

Sign in to post a reply.