CFRatingColor icon indicating copy to clipboard operation
CFRatingColor copied to clipboard

update index.php

Open cubercsl opened this issue 5 years ago • 1 comments

修复:

  • handles 有特殊字符时,查询会频繁失败。
  • 拦截非 GET 请求。

修改:

  • 默认样式改为 flat,与 Shields 保持一致。
  • 使用本地搭建的 Shields 服务,不进行重定向。
  • 查询出错对应的 404 图标。

新增:

  • 使用 codeforces API 返回的 rank 来确定颜色,避免未来 codeforces 调整 rating 线后造成错误。
  • 用户名根据 codeforces API 的返回结果自动修正大小写。

实例: https://cubercsl.cn/api/?user=2014CAIS01

demo

可以根据实际情况修改。

cubercsl avatar Dec 28 '19 09:12 cubercsl

发现没有对查询做缓存,如果使用者的网站访问量很大,访问CF API的流量也会很大,无法接受。

cubercsl avatar Jan 12 '20 02:01 cubercsl