CodeBuddy Usage Credit Chart

Add a credit usage chart above CodeBuddy usage details table.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Penulis
xulingran
Pemasangan harian
0
Total pemasangan
0
Nilai
0 0 0
Versi
0.2.0
Dibuat
05 April 2026
Diperbarui
05 April 2026
ukuran
84,2 KB
Lisensi
MIT
Berlaku untuk

# CodeBuddy Usage Credit Chart

一个用于 CodeBuddy 用量页面的用户脚本插件。
它会在用量明细表格上方自动插入积分消耗图表,帮助你快速查看不同时间范围内的消耗趋势。

## 功能亮点

- 在 `https://www.codebuddy.cn/profile/usage*` 页面自动生效
- 在原有用量明细表格上方新增积分柱状图
- 自动按当前页面筛选范围(日期/周期)聚合数据
- 支持小时/天粒度展示(根据时间范围自动切换)
- 支持悬浮提示,查看单个时间桶的具体积分消耗
- 优先使用接口全量数据,必要时回退到当前表格已加载数据

## 适用场景

- 快速了解最近几天积分消耗波动
- 对比不同日期区间的消耗强度

## 安装方式

1. 安装用户脚本管理器(如 Tampermonkey)。
2. 点击安装。
3. 保存后访问 CodeBuddy 用量页:`https://www.codebuddy.cn/profile/usage`。

## 使用说明

1. 打开用量页后,图表会自动渲染在明细表格上方。
2. 切换页面上的时间范围或筛选条件,图表会自动同步更新。
3. 鼠标悬浮柱子可查看该时段积分消耗值。

## 数据来源与说明

- 插件基于页面已返回的用量数据生成图表,不依赖第三方服务。
- 当接口分页数据可识别时,插件会尝试补齐更多页,以提升统计完整性。
- 若当前页面仅加载部分记录,图表会显示对应的数据来源状态。

## 隐私与安全

- 脚本仅在 CodeBuddy 用量页面生效。
- 不会主动上传你的积分数据到外部服务器。
- 所有图表计算在本地浏览器完成。

## 已知限制

- 依赖 CodeBuddy 当前页面结构与接口字段;若官网改版,插件可能需要更新。
- 网络较慢或接口异常时,图表会短暂显示“加载中/暂无数据”。