Greasy Fork

Greasy Fork is available in English.

Chess.com piece numbers

Adds piece number data to pieces in the chess board

当前为 2021-10-28 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
theusaf
评分
0 0 0
版本
0.0.4
创建于
2021-10-28
更新于
2021-10-28
大小
6.2 KB
许可证
MIT
适用于

Chess.com Chess Piece Numbers for Custom Styles

This user script automatically adds numbers to the pieces in chess.com boards, so you can customize your pieces.

Instructions/How to Use:

  1. Install this user script
  2. Install a user style extension like Stylus
  3. Create or install custom chess piece styles
  4. For examples/links to custom piece styles, see here
  5. For examples on how to create your own style, see here

Creating a Custom Style

Each piece on chess.com has a 2 character class with the team (w or b) and the piece type (p, n, r, b, q, k).

For example, a black knight piece has the class .bn

In addition, all pawns start at the number '2,' so pawns that are promoted can be given their own styles as well.

To style all pieces of a certain type and color, you can do:

chess-board .piece.wp {
  background-image: url(/* some url */) !important;
}

To style a specific piece, you can do:

chess-board .piece.bb[piece-number="1"] {
  background-image: url(/* another url */) !important;
}

Example User Styles

Known Issues

  • Pawn promotion can cause inconsistencies in styling