Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target 页面与 URL/路由 查询支持 #84

Open
zjp-CN opened this issue Oct 8, 2024 · 0 comments
Open

target 页面与 URL/路由 查询支持 #84

zjp-CN opened this issue Oct 8, 2024 · 0 comments

Comments

@zjp-CN
Copy link
Member

zjp-CN commented Oct 8, 2024

https://os-checker.github.io/target 页面可以查询所有被检查仓库,包括 0 诊断结果的仓库。

但它需要手选下拉框,为了更好地直达目标仓库,最好支持路由查询。有几种选择:

  • https://os-checker.github.io/target/{user}/{repo} 不推荐,因为与 /user/repo 造成混淆
  • https://os-checker.github.io/target?user={user}&repo={repo} 有点啰嗦,但可以实现更多查询参数,比如 /target?user={user}&repo={repo}&pkg={pkg}&...
  • https://os-checker.github.io/{user}/{repo}#target 简洁,实现简单 https://kimi.moonshot.cn/share/cs28d2pmqu05gc57djj0 ;也可以拓展到 https://os-checker.github.io/{user}/{repo}/{pkg}#target https://os-checker.github.io/{user}/{repo}#target?pkg={pkg}&...
window.addEventListener('hashchange', function() {
  const hash = window.location.hash;
  // 根据 hash 值执行操作,例如滚动到页面的特定部分
  if (hash === '#c') {
    // 滚动到页面的特定部分
  }
});

更新:更一般地,在查询上支持路径直达。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant