去你的GitCode

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

< 脚本 去你的GitCode 的反馈

提问 / 留言

§
发布于:2024-06-30

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

§
发布于:2024-06-30

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

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;
  }
}

发布留言

登录(不可用)以发布留言。

长期地址
遇到问题?请前往 GitHub 提 Issues。