This Tampermonkey script is designed to add two new download options to the iconfont.cn website.
- Install the Tampermonkey extension for your browser.
- Click on the following link and click the "install" button: link to script
- Go to iconfont.cn and open the project you want to download.
- Once the script is installed and you are on the project page, a new option "Iconify JSON" will appear in the "download" menu. Clicking this option will download the icons in the project as a JSON file that is compatible with the Iconify library.
- Another option "React component" will also appear in the "download" menu. Clicking this option will download the icons in the project as individual React components.
- Cleans up the SVG files by removing bad attributes, tags, and styles.
- Modifies the SVG files to add React-specific attributes and styles.
- Provides two download options: Iconify JSON and React component.
This script is designed for use with the iconfont.cn website, and may not work on other websites.
If you have any suggestions for improvements or find any bugs, please feel free to open an issue or pull request on Github repository.