https://github.com/renbaoshuo/codeforces-rating-badge
https://github.com/renbaoshuo/codeforces-rating-badge
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/renbaoshuo/codeforces-rating-badge
- Owner: renbaoshuo
- License: mit
- Created: 2020-12-27T01:21:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-20T10:44:11.000Z (over 3 years ago)
- Last Synced: 2025-04-06T08:09:54.349Z (21 days ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Codeforces Rating Badge
## Demo

## Deploy
Login into Cloudflare Dashboard and enter `Workers` App. Create a new script, delete default code in the editor, and then copy [the `worker.js` content](https://github.com/renbaoshuo/codeforces-rating-badge/blob/master/worker.js) into the editor.
Optional: After saving the workers script, you can register a route for the scripts.
## Usage
Just insert the link into your website as an image, like this: `
`
Do not forget to replace the default configuration with your own!
## Advanced
If you want to restrict your workers only for your website, all you need to do is to edit a few lines of your workers:
- Launch Cloudflare Workers Editor again.
- You can see some commented out code at the first line like this:```javascript
// const AllowedReferrer = 'baoshuo.ren';
```- replace your domain with `baoshuo.ren`, then remove `//`.
> **Notice**: set `AllowedReferrer` value to `baoshuo.ren` means all the subdomains of `baoshuo.ren` will be allowed as well.
## Author
**Codeforces Rating Badge** © [Baoshuo](https://github.com/renbaoshuo), Released under the [MIT](https://github.com/renbaoshuo/codeforces-rating-badge/blob/master/LICENSE) License.
Authored and maintained by Baoshuo with help from contributors ([list](https://github.com/renbaoshuo/codeforces-rating-badge/graphs/contributors)).> [Personal Website](https://baoshuo.ren) · [Blog](https://blog.baoshuo.ren) · GitHub [@renbaoshuo](https://github.com/renbaoshuo) · Twitter [@renbaoshuo](https://twitter.com/renbaoshuo)